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

[pickers] Remove all the props passed by usePickers to PickersLayout and use the new contexts instead #15495

Open
flaviendelangle opened this issue Nov 19, 2024 · 0 comments
Assignees
Labels
component: pickers This is the name of the generic UI component, not the React module!

Comments

@flaviendelangle
Copy link
Member

flaviendelangle commented Nov 19, 2024

The PickersLayout component (which is overridable with slots.layout) receives a lot of props about the current state of the picker and pass some of them down to the slots it handles (actionBar, toolbar, tabs and shortcut).

I plan to remove all the props it receives outside of the custom one defined in slotProps.layout.

Why?

  • Avoid weird override using slotProps.layout (people should never do slotProps={{ layout: { isRtl: false }}} for instance)

  • Prepare for a composable API

Search keywords:

@flaviendelangle flaviendelangle self-assigned this Nov 19, 2024
@github-actions github-actions bot added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 19, 2024
@flaviendelangle flaviendelangle added component: pickers This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 19, 2024
@flaviendelangle flaviendelangle changed the title [pickers] Prepare PickersLayout to be compatible with a composable API [pickers] Remove all the props passed by usePickers to PickersLayout and use the new contexts instead Nov 19, 2024
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

No branches or pull requests

1 participant