diff --git a/src/base/combination/group.button.js b/src/base/combination/group.button.js index 4df7b392e..a9ba5c23c 100644 --- a/src/base/combination/group.button.js +++ b/src/base/combination/group.button.js @@ -33,11 +33,9 @@ BI.ButtonGroup = BI.inherit(BI.Widget, { self.populate(newValue); }) : o.items; this.populate(items); - if (BI.isFunction(o.value)) { - this.__watch(o.value, function (context, newValue) { - self.setValue(newValue); - }) - } + o.value = BI.isFunction(o.value) ? this.__watch(o.value, function (context, newValue) { + self.setValue(newValue); + }) : o.value; if (BI.isKey(o.value) || BI.isNotEmptyArray(o.value)) { this.setValue(o.value); } diff --git a/src/base/combination/group.virtual.js b/src/base/combination/group.virtual.js index 299cb5d8a..e816ab108 100644 --- a/src/base/combination/group.virtual.js +++ b/src/base/combination/group.virtual.js @@ -17,11 +17,9 @@ BI.VirtualGroup = BI.inherit(BI.Widget, { self.populate(newValue); }) : o.items; this.populate(items); - if (BI.isFunction(o.value)) { - this.__watch(o.value, function (context, newValue) { - self.setValue(newValue); - }) - } + o.value = BI.isFunction(o.value) ? this.__watch(o.value, function (context, newValue) { + self.setValue(newValue); + }) : o.value; if (BI.isKey(o.value)) { this.setValue(o.value); }