-
Notifications
You must be signed in to change notification settings - Fork 832
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
Improve pickers composition #1833
Comments
@Pajn Could you share more details on your use case? What do you wish to accomplish? Which component do you need to customize? |
Right now I would need to add extra controls inside the popup for Now, according to the types, |
@Pajn If you could share a visual preview of what you are going after, it will help |
Regarding the consistency with the core, you can follow mui/material-ui#19706 and #1631 which can help. |
I have solved my immediate problem with overriding the transition component and doing some hacky things with inspecting and cloning children: const TransitionOverride = forwardRef(
(transitionProps: TransitionProps & { children?: any }, ref) => (
<Grow {...transitionProps} ref={ref}>
{cloneElement(transitionProps.children, {
children: (
<div style={{ display: 'flex' }}>
<CommonlyUsed />
{transitionProps.children?.props.children}
</div>
),
})}
</Grow>
),
); It's more the general case I am concerned about. This was harder than it should have been and can easily imagine requirements that might come that I yet does not now how to solve. For example, week numbers or date/time range picking. If I could override and import the Calender component I could easily wrap it and add extra controls around each calendar. |
@Pajn Ok thanks, we track this shortcut feature in #1659. Also, be careful with your use case for the component, please mind #364 (comment). |
@dmtrKovalenko Would this be enough? I believe the integration with an input is not obvious. Maybe we would need a new demo or abstraction? |
@oliviertassinari I think this issue should be reopened as well. |
Closing as too ambitious compared to our bandwidth and the other problems we need to fix |
Is your feature request related to a problem? Please describe.
It's very hard to impossible to customize the components in any way making them unusable if the default behavior does not exactly match the requirements.
Describe the solution you'd like
Like core, add
*Component
props to allow overriding any inner components and also export the inner components used in this library so that one can make use of them when implementing overrides.Describe alternatives you've considered
There aren't really any. I could make separate feature requests for the behavior I need right now but even if all of them gets implemented I would feel a bit uneasy to use this library as any future requirement might require the whole solution to be rewritten in something else.
Additional context
See how the mui Dialog component allows overriding the Backdrop, Paper and Transition components
The text was updated successfully, but these errors were encountered: