props: fix cache update > callback order logic

This commit is contained in:
jean-emmanuel 2018-02-15 09:42:17 +01:00
parent 42bc283bb2
commit 8c479f3921

View file

@ -363,13 +363,15 @@ class Widget extends EventEmitter {
if (JSON.stringify(oldPropValue) !== JSON.stringify(propValue)) {
if (this.onPropChanged(propName, options, oldPropValue)) {
if (!this.constructor.dynamicProps.includes(propName)) {
reCreate = true
} else {
this.cachedProps[propName] = propValue
this.onPropChanged(propName, options, oldPropValue)
changedProps.push(propName)
}
@ -396,9 +398,6 @@ class Widget extends EventEmitter {
onPropChanged(propName, options, oldPropValue) {
if (!this.constructor.dynamicProps.includes(propName)) return true
switch(propName) {
case 'value':