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] Fix broken ref forwarding #33107

Merged
merged 1 commit into from Jun 13, 2022

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Jun 11, 2022

So developers get less noise, so they can focus on the important messages. We didn't test #32950 in depth.

Sample test:

import * as React from 'react';
import TextField from '@mui/material/TextField';
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
import LocalizationProvider from '@mui/lab/LocalizationProvider';
import DatePicker from '@mui/lab/DatePicker';

export default function BasicDatePicker() {
  const [value, setValue] = React.useState<Date | null>(null);

  return (
    <LocalizationProvider dateAdapter={AdapterDateFns}>
      <DatePicker
        label="Basic example"
        value={value}
        onChange={(newValue) => {
          setValue(newValue);
        }}
        renderInput={(params) => <TextField {...params} />}
      />
    </LocalizationProvider>
  );
}

Before

Screenshot 2022-06-11 at 19 54 55

After

Screenshot 2022-06-11 at 19 54 36

@oliviertassinari oliviertassinari added deprecation New deprecation message component: pickers This is the name of the generic UI component, not the React module! labels Jun 11, 2022
@mui-bot
Copy link

mui-bot commented Jun 11, 2022

Details of bundle changes

Generated by 🚫 dangerJS against fedbf00

@mnajdova mnajdova merged commit 5f490ca into mui:master Jun 13, 2022
@oliviertassinari oliviertassinari deleted the fix-deprecations branch June 13, 2022 11:15
@oliviertassinari
Copy link
Member Author

oliviertassinari commented Jun 13, 2022

Oh, I didn't know that #33085 and #33080 existed.

For context, my process to work on this was about 1.:

  1. I wanted to try [core] Remove dead and redundant code #33125 out.
  2. I noticed we had a warning in the console, so I was like, well, why not fix it: [Grid] Fix prop-type key regression #33123
  3. Doing such, I noticed that the date picker had a key prop generated, so I tried it out. I could reproduce
  4. I found this bug, so I fixed it [pickers] Fix broken ref forwarding #33107
  5. I have found 2-3 more problems but I stopped there, I only took notes about them. I would have spent my whole weekend coding otherwise 😁

@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label Jun 17, 2022
322332 added a commit to NucleoidAI/IDE that referenced this pull request Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! deprecation New deprecation message
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants