-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TreeViewList searching bug and simplified interface #809
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Handing this back over to @syedsalehinipg to tidy up the tests and PR description etc. It should be reviewed by somebody else as we have now both contributed. |
dmbarry86
changed the title
Bug/tree view list search items
TreeViewList searching bug and simplified interface
Feb 12, 2024
Skoob1905
suggested changes
Feb 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small doc change but other than that, looks pretty good.
Skoob1905
approved these changes
Feb 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contributes to TD-2030
Changes
This PR fixes a bug with the searching logic in the TreeViewList component introduced in v5.12.0 and also simplifies and tidies up the component interface to closer align with the core MUI components that are being wrapped.
expandSearchTerm
prop has been renamed toexpandSearchResults
to provide clarity over the functionality. This can be set to true to expand all nodes in the tree when a search term is active. Default is false. This can be useful a UX improvement to help users quickly narrow down to an item without having to manually expand nodes.defaultExpanded
prop has been removed. We don't currently have a usecase for this.onSelectionChange
prop has been renamed toonNodeSelect
to directly match the underlying MUI prop.onNodeToggle
prop has been added so consumers can listen to expand/collapse events as well as selection events. VIRTO.BUILD will need this.items
prop has been re-typed and simplified a lot. You now passlabel
andnodeId
which directly align with the underlying MUI props. You can provide optional props fordisabled
to disable a node andtooltip
to show a tooltip on hover.UI/UX
Tree component with optional search.
Searching for single search term
Searching for multiple search terms to further narrow down
Testing notes
Author checklist before assigning a reviewer