fix(Treeview): ignore folder selection in basic example#7906
fix(Treeview): ignore folder selection in basic example#7906tlabaj merged 2 commits intopatternfly:mainfrom
Conversation
|
Preview: https://patternfly-react-pr-7906.surge.sh A11y report: https://patternfly-react-pr-7906-a11y.surge.sh |
mcoker
left a comment
There was a problem hiding this comment.
LGTM, but should we update all of the non-expandable/selectable examples?
|
Just curious - what's the use case for calling |
|
The callback can allow the user to track what folder is opened and execute logic based on that, and I think the initial design of the treeview allowed folders to be selected (and highlighted) so it's also a holdover from that. |
b56b2a9 to
0ce08c3
Compare
|
I went ahead and updated the handful of other tree view examples that only use single selection of leaf nodes to disallow selecting the folder. |
mcoker
left a comment
There was a problem hiding this comment.
LGTM - though the memoization example still attempts to select expandable nodes, should we update that one, too?
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
What: Closes #7785
Folder selection looked like it wasn't being persisted because the parent folder was technically getting selected (but this doesn't have visual styling by default).