-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[TreeView] Improve the expansion API #11476
Conversation
Deploy preview: https://deploy-preview-11476--material-ui-x.netlify.app/ |
I'll add the tests and codemod once I have a confirmation that we agree to go with this new API. And I'd also like to confirm if I should apply the same renames to the selection API ( |
2b6a9fa
to
eafbdbf
Compare
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.
Looking good ... you just missed a change to the jsdocs. Other than that I only have 2 small comments on the wording. Very nice!
docs/data/migration/migration-tree-view-v6/migration-tree-view-v6.md
Outdated
Show resolved
Hide resolved
docs/data/migration/migration-tree-view-v6/migration-tree-view-v6.md
Outdated
Show resolved
Hide resolved
packages/x-tree-view/src/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.types.ts
Show resolved
Hide resolved
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.
Nice improvement! 🎉 The renaming makes sense to me 👍
For consistency's sake I would rename the selection api as well 🤔
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
@michelengelen your requested change is applied 👍 |
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.
nice ... thanks! LGTM!
Closes #10689
onNodeExpansionToggle
will come after the doc split of [TreeView] Introduce theitems
prop #11059Changelog
Breaking changes
The expansion props have been renamed to better describe their behaviors:
onNodeToggle
onExpandedNodesChange
expanded
expandedNodes
defaultExpanded
defaultExpandedNodes