matrix: dynamic children update fix
This commit is contained in:
parent
44c9661b02
commit
a2572821ce
1 changed files with 6 additions and 12 deletions
|
|
@ -81,26 +81,20 @@ class Matrix extends _matrix_base {
|
|||
|
||||
case 'props':
|
||||
|
||||
var children = [...this.children]
|
||||
|
||||
for (let i = children.length - 1; i >= 0; i--) {
|
||||
for (let i = this.children.length - 1; i >= 0; i--) {
|
||||
|
||||
let widget = children[i],
|
||||
data = this.resolveProp('props', undefined, false, false, false, {'$':i})
|
||||
let data = this.resolveProp('props', undefined, false, false, false, {'$':i})
|
||||
|
||||
if (typeof data === 'object' && data !== null) {
|
||||
Object.assign(widget.props, data)
|
||||
Object.assign(this.children[i].props, data)
|
||||
}
|
||||
widget.updateProps(Object.keys(data), this)
|
||||
this.children[i].updateProps(Object.keys(data), this)
|
||||
// this.children[i] might have been recreated
|
||||
this.children[i].container.classList.add('not-editable')
|
||||
|
||||
}
|
||||
|
||||
|
||||
for (let i = this.children - 1; i >= 0; i--) {
|
||||
let widget = children[i]
|
||||
widget.container.classList.add('not-editable')
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue