You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tree items only show an expand button if they have children. This makes sense in many use cases, but is inconvenient when displaying directory trees, because empty directories look like files. More generally, there are trees where it is important to distinguish nodes from leaves (and while I can use icons to distinguish them, it is inconsistent to have some nodes with an expand buttons and others without).
The macOS Finder, for example, displays empty folders with an expand button, which also makes it possible to open them. This is useful, e.g. when viewing a shared folder, so the user can decide whether or not they want to see the content as it changes over time.
Currently, WaTreeItem has an isLeaf property that is set to !this.lazy && this.getChildrenItems().length === 0.
One possibility would be a new (optional) attribute, e.g. expandable, that overrides this default behavior. As far as I can tell, that's the only change that's needed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Tree items only show an expand button if they have children. This makes sense in many use cases, but is inconvenient when displaying directory trees, because empty directories look like files. More generally, there are trees where it is important to distinguish nodes from leaves (and while I can use icons to distinguish them, it is inconsistent to have some nodes with an expand buttons and others without).
The macOS Finder, for example, displays empty folders with an expand button, which also makes it possible to open them. This is useful, e.g. when viewing a shared folder, so the user can decide whether or not they want to see the content as it changes over time.
Currently,
WaTreeItemhas anisLeafproperty that is set to!this.lazy && this.getChildrenItems().length === 0.One possibility would be a new (optional) attribute, e.g.
expandable, that overrides this default behavior. As far as I can tell, that's the only change that's needed.All reactions