Skip to content
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] Remove state.items.itemTree #12717

Merged
merged 6 commits into from
Apr 11, 2024

Conversation

flaviendelangle
Copy link
Member

While working on #12213, I noticed that itemTree was now totally redundant with orderedItemChildren.

@flaviendelangle flaviendelangle self-assigned this Apr 9, 2024
@flaviendelangle flaviendelangle added the component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module! label Apr 9, 2024
id,
children,
}: TreeViewItemIdAndChildren): ReturnType<typeof instance.getItemsToRender>[number] => {
const getItemsToRender = React.useCallback(() => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The useCallback was not needed since we call this function on every render

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but you added it anyways? Am I misunderstanding something? 🤯

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read the change backward, fixed 😬

@mui-bot
Copy link

mui-bot commented Apr 9, 2024

Deploy preview: https://deploy-preview-12717--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 90774f0

@flaviendelangle flaviendelangle changed the title [TreeView] Remove state.items.itemTree [TreeView] Remove state.items.itemTree Apr 9, 2024
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 10, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 10, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 11, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 11, 2024
Copy link
Contributor

@noraleonte noraleonte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@flaviendelangle flaviendelangle merged commit 95c9760 into mui:master Apr 11, 2024
17 checks passed
@flaviendelangle flaviendelangle deleted the remove-itemTree branch April 11, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants