-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Replace <TreeItem />
with <TreeItem2 />
and migrate all the components and utils
#14913
Conversation
Deploy preview: https://deploy-preview-14913--material-ui-x.netlify.app/ Updated pages: |
69669e9
to
25c8d76
Compare
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. |
TreeItem
with TreeItem2
and migrate all the components and utils<TreeItem />
with <TreeItem2 />
and migrate all the components and utils
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. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
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.
LGTM! Thanks for the effort 💙 🚀
docs/data/migration/migration-tree-view-v7/migration-tree-view-v7.md
Outdated
Show resolved
Hide resolved
docs/data/migration/migration-tree-view-v7/migration-tree-view-v7.md
Outdated
Show resolved
Hide resolved
docs/data/migration/migration-tree-view-v7/migration-tree-view-v7.md
Outdated
Show resolved
Hide resolved
@@ -19,7 +19,7 @@ Hover over them in the demo below to see each slot. | |||
<!-- TBD which option is the best: interactive or image --> | |||
<!-- {{"demo": "CustomTreeItemDemo.js", "hideToolbar": true}} --> | |||
|
|||
{{"component": "modules/components/TreeItem2Anatomy.js"}} | |||
{{"component": "modules/components/TreeItemAnatomy.js"}} |
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.
The labels on the image still have the old naming. I'm creating a follow-up to replace them 😄
Co-authored-by: Nora <[email protected]> Signed-off-by: Flavien DELANGLE <[email protected]>
…-v7.md Co-authored-by: Nora <[email protected]> Signed-off-by: Flavien DELANGLE <[email protected]>
…-v7.md Co-authored-by: Nora <[email protected]> Signed-off-by: Flavien DELANGLE <[email protected]>
…-v7.md Co-authored-by: Nora <[email protected]> Signed-off-by: Flavien DELANGLE <[email protected]>
Closes #14767
TreeItem
TreeItem2
=>TreeItem
(same for all other components and utils withTreeItem2
in their name)Changelog
Tree View
The
ContentComponent
orContentProps
props of the<TreeItem />
component have been removed in favor of the newslots
,slotProps
props and of theuseTreeItem
hook.Learn more about the anatomy of the Tree Items and the customization utilities provided on the Tree Item Customization page.
The
onClick
andonMouseDown
were the only event callback that were passed to the content of the Tree Item instead of its root.The goal was to make sure that the callback was not fired when clicking on a descendant of a giving item.
This inconsistency has been solved, all the event manager now target the root of the item, and you can use the
onItemClick
prop on the Tree View component to target the content of an item:All the new Tree Item-related components and utils (introduced in the previous major to improve the DX of the Tree Item component) are becoming the default way of using the Tree Item and are therefore losing their
2
suffix: