Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Oct 22, 2025

Fixes #14228
Closes #19426

In this PR:

  • The store object is created once on mount with all its method. There is no code run on every render to update its methods.
  • The contextValue.wrapRoot property have been replaced by manual JSX in the various Tree View components.
  • The parameters to pass to the store instead of the DOM are now hardcoded on a useMemo instead of being listed by each plugin.

Differences with the Scheduler stores

  • The product methods are stored in plugin instead of being defined by the store

    On the Scheduler, we call methods like store.setVisibleResources. For the Tree View, the equivalent would be store.resources.setVisibleResources.
    This is because the main store create several sub-classes for each main feature (focus, keyboard navigation, expansion, ...) that expose there own methods. This make the codebase a lot more scalable.

@flaviendelangle flaviendelangle self-assigned this Oct 22, 2025
@flaviendelangle flaviendelangle added type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. scope: tree view Changes related to the tree view. This includes TreeView, TreeItem. labels Oct 22, 2025
@mui-bot
Copy link

mui-bot commented Oct 22, 2025

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

Updated pages:

Bundle size report

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 🔺+1.8KB(+2.80%) ▼-314B(-1.57%)
@mui/x-tree-view-pro 🔺+849B(+0.97%) ▼-745B(-2.70%)

Details of bundle changes

Generated by 🚫 dangerJS against 850add1

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 29, 2025
@github-actions
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 Oct 29, 2025
@github-actions
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 Oct 30, 2025
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: tree view Changes related to the tree view. This includes TreeView, TreeItem. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tree view][docs] Example for useTreeViewApiRef with generic type [tree view] apiRef type is Partial<{}> which causes Typescript compilation to fail

2 participants