widgets: regression in inter-widget sync mechanism
This commit is contained in:
parent
15c38fa78e
commit
182941a22c
1 changed files with 8 additions and 1 deletions
|
|
@ -200,6 +200,7 @@ class Widget extends EventEmitter {
|
|||
|
||||
this.isValueChanging = false
|
||||
this.valueChangingTimeout = null
|
||||
this.valueChangingQueue = {}
|
||||
|
||||
this.parsers = {}
|
||||
this.parsersLocalScope = options.locals || {}
|
||||
|
|
@ -491,8 +492,14 @@ class Widget extends EventEmitter {
|
|||
this.linkedValueChangedCallback = (e)=>{
|
||||
if (this.isValueChanging && e.widget !== this) {
|
||||
clearTimeout(this.valueChangingTimeout)
|
||||
this.valueChangingQueue[e.widget.hash] = e
|
||||
this.valueChangingTimeout = setTimeout(()=>{
|
||||
if (!this.removed) this.onLinkedPropsChanged(e, 'value-changed')
|
||||
if (!this.removed) {
|
||||
for (var h in this.valueChangingQueue) {
|
||||
this.onLinkedPropsChanged(this.valueChangingQueue[h], 'value-changed')
|
||||
}
|
||||
}
|
||||
this.valueChangingQueue = {}
|
||||
})
|
||||
} else {
|
||||
this.onLinkedPropsChanged(e, 'value-changed')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue