clone: prevent cloned widgets from recreating themselves from prop inheritance changes
-> the clone widget was already watching for its target widget-created events and updating accordingly, thus causing concurrent attempts to update its children, errors and memory leaks
This commit is contained in:
parent
0cd1a1a33c
commit
ff2fdab80c
1 changed files with 6 additions and 0 deletions
|
|
@ -55,6 +55,12 @@ module.exports = class Clone extends _widgets_base {
|
|||
}
|
||||
})
|
||||
|
||||
this.on('widget-created', (e)=>{
|
||||
if (e.widget == this) return
|
||||
widgetManager.off(`change.${e.widget.hash}`)
|
||||
widgetManager.off(`widget-creates.${e.widget.hash}`)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
createClone(widget) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue