-
-
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
[DataGrid] Refactor: create base Select #16394
base: master
Are you sure you want to change the base?
Conversation
Deploy preview: https://deploy-preview-16394--material-ui-x.netlify.app/ |
...rest | ||
} = props; | ||
return ( | ||
<MUIFormControl |
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.
What if we need to pass different props to FormControl
/InputLabel
for two different BaseSelect
usages?
To allow the customizability (e.g. tweaking props passed to FormControl
) without changing the function BaseSelect
implementation, would it be better to keep components like FormControl
and InputLabel
separate like before, but make the top level components design-specific provided to the Data Grid using configuration
?
For example:
GridColumnMenuAggregationItem
gets moved to the/material/components
- It uses
FormControl
,InputLabel
, andSelect
like today - It is passed in configuration from
material
entry point. (technically it could also be a slot but I think they should be limited to the reusable parts rather than specific components.) - Base UI Grid (or another design system) passes a totally different
GridColumnMenuAggregationItem
component.
In general, if we go this direction, /{design-system}/components
could contain more such components which are not generic enough to be slots but their implementation is more binded to a specific design system, they could be passed as configuration.components
or similar.
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.
What if we need to pass different props to FormControl/InputLabel for two different BaseSelect usages?
We can always re-use the slotProps
mechanism. I'm trying to limit the exposed API because the amount of work to add another design-system depends on the amount of API to re-implement. I'm open to moving bigger components to design-system folders if necessary.
Part of the design-system agnostic work.
Create base Select.