tree: update widget visibility when it changes dynamically

This commit is contained in:
jean-emmanuel 2021-05-05 10:09:05 +02:00
parent 9844804d98
commit e08b73aba0
3 changed files with 22 additions and 1 deletions

View file

@ -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