-
-
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] Apply experimental features in getDefaultizedParams
instead of in the plugin render
#14661
[TreeView] Apply experimental features in getDefaultizedParams
instead of in the plugin render
#14661
Conversation
…d of in the plugin render
f346b49
to
174c660
Compare
Deploy preview: https://deploy-preview-14661--material-ui-x.netlify.app/ Updated pages: |
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.
Nice refactor! Thanks for tackling it! 🎉
@@ -54,10 +54,16 @@ export const extractPluginParamsFromProps = < | |||
} | |||
}); | |||
|
|||
const cleanExperimentalFeatures = |
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.
Super nitpick: cleanExperimentalFeatures
sounds a bit weird.. I get why it's called that, and I also don't have a better idea for what to call it, so I guess it's fine. 😅
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.
Changed from experimentalFeatures
=> cleanExperimentalFeatures
to inExperimentalFeatures
=> experimentalFeatures
…ead of in the plugin render (mui#14661)
Extracted from #14210 (first of a long list 😆 )
In #14210 I try to get rid of
instance.isTreeViewEditable
(becauseinstance
can only contain stuff that do not need to trigger a re-render of items when it changes). Instead I'm using theisItemEditable
param directly (both in items and in plugins depending onuseTreeViewLabel
).The easiest solution I found was to apply the default value of
isItemEditable
ingetDefaultizedParams
and to throw the error there when the experimental feature is not set.