Skip to content
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

[internal][pickers] Pass desktop wrapper props explicitly #26120

Merged
merged 2 commits into from
May 4, 2021

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented May 4, 2021

Clears up where props goes.

Minor step with the goal of removing the ResponsiveWrapper.

@eps1lon eps1lon added the component: pickers This is the name of the generic UI component, not the React module! label May 4, 2021
@mui-pr-bot
Copy link

mui-pr-bot commented May 4, 2021

Details of bundle changes

@material-ui/lab: parsed: +0.11% , gzip: +0.16%

Generated by 🚫 dangerJS against c10ef40

@@ -47,9 +47,14 @@ const DesktopDatePicker = React.forwardRef(function DesktopDatePicker<TDate>(
const validationError = useDateValidation(props) !== null;
const { pickerProps, inputProps, wrapperProps } = usePickerState(props, valueManager);

// Note that we are passing down all the value without spread.
// It saves us >1kb gzip and make any prop available automatically on any level down.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make any prop available automatically on any level down

That's not a good thing if we don't see what props are available where because they'll eventually get used creating a coupling that might've not been intended.

@eps1lon eps1lon marked this pull request as ready for review May 4, 2021 09:34
@eps1lon eps1lon merged commit 3709573 into mui:next May 4, 2021
@eps1lon eps1lon deleted the chore/pickers/explicit-desktop branch May 4, 2021 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants