diff --git a/src/browser/js/app/widgets/matrices/matrix.js b/src/browser/js/app/widgets/matrices/matrix.js index 948d136c..6da98710 100644 --- a/src/browser/js/app/widgets/matrices/matrix.js +++ b/src/browser/js/app/widgets/matrices/matrix.js @@ -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 }