prop-inheritance; error when changing a property that's inherited by a widget to define its address and at least one non-dynamic property

This commit is contained in:
jean-emmanuel 2019-02-18 15:20:53 +01:00
parent 1232a00107
commit 0d2293f9b3
2 changed files with 6 additions and 2 deletions

View file

@ -6,6 +6,7 @@
- editor: changes applied to wrong widget when clicking on a widget while editing another widget's property
- push: allow setting `value` property
- allow whitespaces in path for `--custom-module`
- error when changing a property that's inherited by a widget to define its address and at least one non-dynamic property
- widgets
- sliders: when `steps` is set, scrolling on the widget makes it go directly from one step to another

View file

@ -651,7 +651,10 @@ class Widget extends EventEmitter {
if (!this.isDynamicProp(propName)) {
reCreate = true
if ((!widget || !this.contains(widget)) && widget !== this && !(widget === this && updatedProps.length === 1 && updatedProps[0] === 'value')) {
reCreate = true
break
}
} else {
@ -664,7 +667,7 @@ class Widget extends EventEmitter {
}
}
if (reCreate && (!widget || !this.contains(widget)) && widget !== this && !(widget === this && updatedProps.length === 1 && updatedProps[0] === 'value')) {
if (reCreate) {
return this.reCreateWidget({reCreateOptions: options})