diff --git a/src/base/combination/bubble.js b/src/base/combination/bubble.js index e35fa38ca..ca0c9ef60 100644 --- a/src/base/combination/bubble.js +++ b/src/base/combination/bubble.js @@ -228,7 +228,7 @@ _assertPopupView: function () { var self = this, o = this.options; if (this.popupView == null) { - this.popupView = BI.createWidget(this.options.popup, { + this.popupView = BI.createWidget(BI.isFunction(this.options.popup) ? this.options.popup() : this.options.popup, { type: "bi.bubble_popup_view", showArrow: o.showArrow, value: o.value diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index bdb488e4c..202e31c3d 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -103,7 +103,7 @@ _assertPopupView: function () { var self = this, o = this.options; if (this.popupView == null) { - this.popupView = BI.createWidget(this.options.popup, { + this.popupView = BI.createWidget(BI.isFunction(this.options.popup) ? this.options.popup() : this.options.popup, { type: "bi.popup_view", showArrow: o.showArrow, value: o.value diff --git a/src/case/combo/bubblecombo/combo.bubble.js b/src/case/combo/bubblecombo/combo.bubble.js index 2f1db8b2d..e143efab0 100644 --- a/src/case/combo/bubblecombo/combo.bubble.js +++ b/src/case/combo/bubblecombo/combo.bubble.js @@ -53,12 +53,12 @@ BI.BubbleCombo = BI.inherit(BI.Widget, { offsetStyle: o.offsetStyle, showArrow: true, el: o.el, - popup: BI.extend({ + popup: () => BI.extend({ type: "bi.bubble_popup_view", animation: "bi-zoom-big", animationDuring: 200, primary: o.primary - }, o.popup) + }, BI.isFunction(this.options.popup) ? this.options.popup() : this.options.popup) }); this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE, function () { self.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE, arguments);