mui / material-ui

Material UI: Ready-to-use foundational React components, free forever. It includes Material UI, which implements Google's Material Design.
https://mui.com/material-ui/
MIT License
91.86k stars 31.57k forks source link

[core] Fix React 18.3 warnings about spreading keys in the Material UI `Autocomplete` component #42099

Closed heath-freenome closed 1 week ago

heath-freenome commented 2 weeks ago

This is related to #40905 only it fixes @mui/material

Iterate toward the resolution of #39833.

mui-bot commented 2 weeks ago

Netlify deploy preview

https://deploy-preview-42099--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad) Details of bundle changes

Generated by :no_entry_sign: dangerJS against ceeb9fda3106cdc199011309f861fa54ef5cd3ed

DiegoAndai commented 2 weeks ago

Hey @heath-freenome, thanks for working on this! We need this for https://github.com/mui/material-ui/pull/42047, but it's missing some fixes. I've updated the PR with the missing cases. Adding @ZeeshanTamboli as a reviewer.

DiegoAndai commented 2 weeks ago

@michaldudak This requires an update on mui-base, but it's only a test file, so I figure it's no problem, right?

heath-freenome commented 2 weeks ago

Hey @heath-freenome, thanks for working on this! We need this for #42047, but it's missing some fixes. I've updated the PR with the missing cases. Adding @ZeeshanTamboli as a reviewer.

@DiegoAndai Thanks for fixing that!!

michaldudak commented 2 weeks ago

This requires an update on mui-base, but it's only a test file, so I figure it's no problem, right?

No problem at all! I'll port this update to the Base UI repo as well.

oliviertassinari commented 1 week ago

What I can read on this:

           value.map((option, index) => (
-            <Chip variant="outlined" label={option} {...getTagProps({ index })} />
+            const { key, ...tagProps } = getTagProps({ index });
+            return (
+              <Chip variant="outlined" label={option} key={key} {...tagProps} />
+            );
           })
         }
heath-freenome commented 1 week ago

@ZeeshanTamboli Thanks for all the help on this... When will this fix be released?

ZeeshanTamboli commented 1 week ago

@heath-freenome Regarding for the v6 alpha release, it's scheduled for next week. However, I'm unsure about release in v5, as it wasn't cherry-picked to the master branch for v5.

oliviertassinari commented 1 week ago

@ZeeshanTamboli v6 alpha release*.

Could someone port this to v5?