tree: update widget visibility when it changes dynamically
This commit is contained in:
parent
9844804d98
commit
e08b73aba0
3 changed files with 22 additions and 1 deletions
|
|
@ -303,6 +303,20 @@ class UiTree extends UiWidget {
|
|||
|
||||
}
|
||||
|
||||
updateVisibility(widget) {
|
||||
|
||||
if (!this.parent.disabled) {
|
||||
|
||||
var w = DOM.get(this.list, '[data-widget="' + widget.hash + '"]')[0]
|
||||
|
||||
if (w) {
|
||||
w.classList.toggle('invisible', !widget.getProp('visible'))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = UiTree
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue