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

Alpha 85 throws console errors in tests that 84 does not #33085

Closed
httpete opened this issue Jun 9, 2022 · 13 comments · Fixed by #33134
Closed

Alpha 85 throws console errors in tests that 84 does not #33085

httpete opened this issue Jun 9, 2022 · 13 comments · Fixed by #33134
Labels
bug 🐛 Something doesn't work package: lab Specific to @mui/lab regression A bug, but worse

Comments

@httpete
Copy link

httpete commented Jun 9, 2022

With 85 in my jest tests I get this, with 84 smooth and nice.

      Warning: forwardRef render functions accept exactly two parameters: props and ref. Did you forget to use the ref parameter?
      at printWarning (node_modules/react/cjs/react.development.js:207:30)
      at error (node_modules/react/cjs/react.development.js:181:7)
      at Object.forwardRef (node_modules/react/cjs/react.development.js:1473:9)
      at Object.<anonymous> (node_modules/@mui/lab/node/CalendarPicker/CalendarPicker.js:34:43)
@oliviertassinari oliviertassinari added component: date picker This is the name of the generic UI component, not the React module! status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jun 9, 2022
@mnajdova
Copy link
Member

cc @flaviendelangle maybe we should have used React.forwardRef for the wrappers, but I am not sure if it is worth fixing. Note that the pickers are moving from @mui/lab to @mui/x, for more info on this - https://mui.com/blog/lab-date-pickers-to-mui-x/#how-do-i-migrate You may want to migrate them. There is a codemod for this too.

@mnajdova mnajdova added out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future) and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jun 10, 2022
@mnajdova
Copy link
Member

I am marking as wontfix, but will let Flavien have the final decision.

@flaviendelangle
Copy link
Member

We have the exact same here #33080 for LoadingButton so I think there is something to fix

@masterambi
Copy link

We have the exact same here #33080 for LoadingButton so I think there is something to fix

yeah me too

@httpete
Copy link
Author

httpete commented Jun 10, 2022 via email

@erdalstk
Copy link

What’s really bad is - we aren’t even importing or using these calendar components. Something really changed .

On Jun 10, 2022, at 7:52 AM, Ramzy Rashaun Arief @.***> wrote:  We have the exact same here #33080 for LoadingButton so I think there is something to fix yeah me too — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

exactly, same for me.

@flaviendelangle flaviendelangle removed their assignment Jun 10, 2022
@ddolcimascolo
Copy link

Same here guys. I do import pickers from mui-x but I still have the lab for another component (TabContext from the top of my mind) and my tests are now full of this warning...

I can provide further logs, context, reproduction repo if that's worth it. Feel free to ask

Cheers,
David

@ddolcimascolo
Copy link

@flaviendelangle @mnajdova Should you remove the won't fix label?

@Nefcanto
Copy link

I'm getting this too. Without doing anything. I just updated my docker image and reinstalled everything and now I get it for DatePicker.js.

@cherniavskii
Copy link
Member

@Nefcanto can you provide an example reproducing the issue? You can start with this demo: https://codesandbox.io/s/2s7m0n?file=/demo.tsx

@cherniavskii
Copy link
Member

Should be fixed by #33107

@mnajdova mnajdova added bug 🐛 Something doesn't work package: lab Specific to @mui/lab and removed out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future) component: date picker This is the name of the generic UI component, not the React module! labels Jun 13, 2022
@mnajdova
Copy link
Member

Should be fixed by #33107

Not really, the problem with LoadingButton is still there.

@oliviertassinari oliviertassinari added the regression A bug, but worse label Jun 13, 2022
@mnajdova
Copy link
Member

Found the problem, one more components need to forward a ref. Creating a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work package: lab Specific to @mui/lab regression A bug, but worse
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants