patternfly-react icon indicating copy to clipboard operation
patternfly-react copied to clipboard

Tree View - allow for more control of underlying Tree View List Items

Open florkbr opened this issue 6 months ago • 1 comments

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"):

Image

florkbr avatar Jun 26 '25 19:06 florkbr

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Aug 26 '25 11:08 github-actions[bot]