From 7b084a98bb826cf9fa80c75d326728b2bdb0c94e Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 20 Oct 2016 11:52:14 +0300 Subject: [PATCH] Button: set menu when button isn't rendered. --- apps/common/main/lib/component/Button.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/common/main/lib/component/Button.js b/apps/common/main/lib/component/Button.js index cc142495a..3f251628c 100644 --- a/apps/common/main/lib/component/Button.js +++ b/apps/common/main/lib/component/Button.js @@ -494,9 +494,10 @@ define([ }, setMenu: function (m) { - if (this.rendered && m && _.isObject(m) && _.isFunction(m.render)){ + if (m && _.isObject(m) && _.isFunction(m.render)){ this.menu = m; - this.menu.render(this.cmpEl); + if (this.rendered) + this.menu.render(this.cmpEl); } } });