dynamic props: only fire props-changed event when the widget is not recreated
This commit is contained in:
parent
35bc5a17ae
commit
af830e5ee3
1 changed files with 5 additions and 2 deletions
|
|
@ -444,8 +444,7 @@ class Widget extends EventEmitter {
|
|||
} else {
|
||||
|
||||
this.cachedProps[propName] = propValue
|
||||
this.onPropChanged(propName, options, oldPropValue)
|
||||
changedProps.push(propName)
|
||||
changedProps.push({propName, oldPropValue})
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -459,6 +458,10 @@ class Widget extends EventEmitter {
|
|||
|
||||
} else if (changedProps.length) {
|
||||
|
||||
for (var i in changedProps) {
|
||||
this.onPropChanged(changedProps[i].propName, options, changedProps[i].oldPropValue)
|
||||
}
|
||||
|
||||
widgetManager.trigger('prop-changed.*', [{
|
||||
id: this.getProp('id'),
|
||||
props: changedProps,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue