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] Avoid unnecessary re-rendering when focus or blur #11558

Open
wants to merge 3 commits into
base: next
Choose a base branch
from

Conversation

bigrivi
Copy link

@bigrivi bigrivi commented Jan 3, 2024

Fixes #11518

  1. When there is a form element in the treeitem, the focus and blur will be triggered at intervals, which will call setState and trigger the re-rendering of the root component.
  2. So only when nodeId and cleanNodeId are different, setState will be called.

@bigrivi bigrivi changed the title Avoid unnecessary re-rendering when focus or blur [Tree-View] Avoid unnecessary re-rendering when focus or blur Jan 3, 2024
@bigrivi bigrivi changed the title [Tree-View] Avoid unnecessary re-rendering when focus or blur [TreeView] Avoid unnecessary re-rendering when focus or blur Jan 3, 2024
@mui-bot
Copy link

mui-bot commented Jan 3, 2024

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

Generated by 🚫 dangerJS against 5ee0883

@flaviendelangle
Copy link
Member

Hi,

Thanks for your contribution, I let you have a look at the CI errors 👍

@flaviendelangle flaviendelangle added the component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module! label Jan 3, 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 Feb 28, 2024
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! PR: out-of-date The pull request has merge conflicts and can't be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[tree view] onBlur event causes TreeView performance issues
3 participants