-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 PickersTextField API? #15705
Comments
We are migrating away from the
The keyboard editing is way more complex on the picker than it is on the select or on the autocomplete.
The migration is as follow:
The migration is super long but this part of the UI is so central that I don't see how we could have moved faster :/ |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. |
Now that we are in the middle of the migration, I think the only way we could have made it smoother would have been:
You can find an unfinished proposal for the new DX to build a custom field here. But to be honest, doing migration like that while making sure we are staying consistent with the |
Steps to reproduce
Current behavior
We have custom pickers API: https://mui.com/x/react-date-pickers/custom-field/#using-material-pickerstextfield. The APIs look backward. If I have a custom TextField, I should be able to provide it, and once I can do this,
PickersTextField
seems to serve no purpose.Expected behavior
We remove this API?
Instead, we show how to use existing input APIs, either TextField from Material UI: https://mui.com/x/react-date-pickers/custom-field/#using-material-textfield or a raw
<div>
/<input>
https://mui.com/x/react-date-pickers/custom-field/#usage-with-an-unstyled-inputContext
I don't understand the purpose of the
PickersTextField
API. At first glance, it looks like a footgun. I'm expecting an API like https://mui.com/material-ui/react-autocomplete/. There seems to be nothing more intrinsically complex in a picker than in a select or a combo box to implement, so why can't we remove this?Relative to #14496
I landed here from mui/material-ui#44631, because we have this code:
mui-x/packages/x-date-pickers/src/PickersTextField/PickersOutlinedInput/Outline.tsx
Line 118 in 659dc5f
which felt: "what?"
Your environment
v7.23.0
The text was updated successfully, but these errors were encountered: