advanced syntaxes: restore stupid-simple resolution order, deduping value changes brings more problem than it solves
history:fe682693b1,0e54c11f13,182941a22c,3a5fdf17c7,8b92400c1e
This commit is contained in:
parent
1a4b971b18
commit
0e68557b85
5 changed files with 9 additions and 39 deletions
|
|
@ -345,14 +345,12 @@ class Widget extends EventEmitter {
|
|||
|
||||
changed(options) {
|
||||
|
||||
widgetManager.valueChangeLock()
|
||||
this.trigger('value-changed', {
|
||||
widget: this,
|
||||
options: options,
|
||||
id: this.getProp('id'),
|
||||
linkId: this.getProp('linkId')
|
||||
})
|
||||
widgetManager.valueChangeUnlock()
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -487,11 +485,11 @@ class Widget extends EventEmitter {
|
|||
this.onLinkedPropsChanged(e, 'value-changed')
|
||||
}
|
||||
|
||||
widgetManager.on('value-changed-lazy', this.linkedValueChangedCallback, {context: this})
|
||||
widgetManager.on('value-changed', this.linkedValueChangedCallback, {context: this})
|
||||
|
||||
} else if (this.linkedPropsValueCallback && !Object.keys(this.linkedPropsValue).length) {
|
||||
|
||||
widgetManager.off('value-changed-lazy', this.linkedValueChangedCallback)
|
||||
widgetManager.off('value-changed', this.linkedValueChangedCallback)
|
||||
delete this.linkedValueChangedCallback
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,7 +199,9 @@ class Panel extends Container() {
|
|||
this.navigation = this.widget.appendChild(html`<div class="navigation ${'tabs-' + this.getProp('tabsPosition')}"></div>`)
|
||||
|
||||
this.children = options.children || new Array(this.getProp('tabs').length)
|
||||
for (let i = 0; i < this.children.length; i++) {
|
||||
var length = this.children.length
|
||||
|
||||
for (let i = 0; i < length; i++) {
|
||||
if (this.children[i]) {
|
||||
this.widget.appendChild(this.children[i].container)
|
||||
this.children[i].mounted = true
|
||||
|
|
@ -240,7 +242,9 @@ class Panel extends Container() {
|
|||
this.childrenType = 'widget'
|
||||
|
||||
this.children = options.children || new Array(this.getProp('widgets').length)
|
||||
for (let i = 0; i < this.children.length; i++) {
|
||||
var length = this.children.length
|
||||
|
||||
for (let i = 0; i < length; i++) {
|
||||
if (this.children[i]) {
|
||||
this.widget.appendChild(this.children[i].container)
|
||||
this.children[i].mounted = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue