-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[tree view] Introduce a Tree View Store to clean the internals #20051
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
base: master
Are you sure you want to change the base?
Conversation
|
Deploy preview: https://deploy-preview-20051--material-ui-x.netlify.app/ Updated pages:
Bundle size report
|
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
4e145d8 to
9887252
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. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Fixes #14228
Closes #19426
Extracted PRs
TreeItemIdtype instead of raw string #20233apiRef#20235In this PR:
storeobject is created once on mount with all its method. There is no code run on every render to update its methods.contextValue.wrapRootproperty have been replaced by manual JSX in the various Tree View components.useMemoinstead 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 bestore.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.