state: delay state restoring after updating a widget to prevent edition errors in some cases (#556)
This commit is contained in:
parent
54403a7db8
commit
526c097e0e
1 changed files with 8 additions and 1 deletions
|
|
@ -21,6 +21,8 @@ var StateManager = class StateManager {
|
|||
this.valueNewPropQueue = {}
|
||||
this.queueCounter = 0
|
||||
|
||||
this.flushTimeout = null
|
||||
|
||||
}
|
||||
|
||||
get(filter) {
|
||||
|
|
@ -230,7 +232,12 @@ var StateManager = class StateManager {
|
|||
|
||||
decrementQueue() {
|
||||
this.queueCounter--
|
||||
if (this.queueCounter == 0) this.flush()
|
||||
if (this.queueCounter == 0) {
|
||||
if (this.flushTimeout) clearTimeout(this.flushTimeout)
|
||||
this.flushTimeout = setTimeout(()=>{
|
||||
this.flush()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue