diff --git a/src/case/button/icon/icon.change.js b/src/case/button/icon/icon.change.js index 8790008e2..e65160879 100644 --- a/src/case/button/icon/icon.change.js +++ b/src/case/button/icon/icon.change.js @@ -31,8 +31,11 @@ BI.IconChangeButton = BI.inherit(BI.Single, { }, _init: function () { - BI.IconChangeButton.superclass._init.apply(this, arguments); var self = this, o = this.options; + o.iconCls = BI.isFunction(o.iconCls) ? this.__watch(o.iconCls, function (context, newValue) { + self.setIcon(newValue); + }) : o.iconCls; + BI.IconChangeButton.superclass._init.apply(this, arguments); this.button = BI.createWidget({ type: "bi.icon_button", element: this, @@ -80,4 +83,4 @@ BI.IconChangeButton = BI.inherit(BI.Single, { } }); BI.IconChangeButton.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.icon_change_button", BI.IconChangeButton); \ No newline at end of file +BI.shortcut("bi.icon_change_button", BI.IconChangeButton);