-
Notifications
You must be signed in to change notification settings - Fork 370
Description
Is this a new component or an extension of an existing one?
Tree View/Tree View List Item
The issue
While working on adopting the Tree View into our UI, we noticed it is not possible to "disable" items in the tree (specifically for non-checkbox tree view items).
For our particular use case, the "disabled" item behavior would be to set the pf-v6-u-text-color-disabled
text class and prevent clicking/selecting on the item. However it would still be possible to expand the item (if it has children that are not also disabled).
Since the tree view DOM is created only when the menu is open and the DOM is expanded, we don't really have many options for a work-around either (searching the DOM for IDs and setting styles, etc).
Describe the feature
This feature could be implemented by adding a disabled
optional prop for the list items (perhaps pulled from the data item), however a longer term solution might be to give more flexibility to using custom list item components in the Tree View like we do elsewhere (see https://www.patternfly.org/extensions/data-view/overview).
Are there visuals for this feature? If applicable, please include examples for each state and for varying widths
Example of what we need (modified in the PF example; Application 2
is "disabled"):
Metadata
Metadata
Assignees
Labels
Type
Projects
Status