widget: reuse hash upon recreation

widget: fix js locals reuse
tree: use hash instead of id to determine expanded containers
This commit is contained in:
bordun 2020-03-23 12:34:50 +01:00
parent 47005370e5
commit e9fb44884c
4 changed files with 19 additions and 14 deletions

View file

@ -171,7 +171,7 @@ class Widget extends EventEmitter {
this.errors = {}
this.parent = options.root ? widgetManager : options.parent
this.parentNode = options.parentNode
this.hash = nanoid('abcdefghijklmnopqrstuvwxyABCDEFGHIJKLMNOPQRSTUVWXYZ', 10)
this.hash = options.hash || nanoid('abcdefghijklmnopqrstuvwxyABCDEFGHIJKLMNOPQRSTUVWXYZ', 10)
this.children = []
this.reCreateOptions = options.reCreateOptions
this.removed = false