Skip to content

Commit 1ed9af3

Browse files
[autocomplete] Avoid spread operator
1 parent fe5a59e commit 1ed9af3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/mui-material/src/Autocomplete/Autocomplete.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,9 +554,9 @@ const Autocomplete = React.forwardRef(function Autocomplete(inProps, ref) {
554554

555555
const renderGroup = renderGroupProp || defaultRenderGroup;
556556
const defaultRenderOption = (props2, option) => {
557-
const { key, ...otherProps } = props2;
557+
// Need to clearly apply key because of https://github.com/vercel/next.js/issues/55642
558558
return (
559-
<li key={key} {...otherProps}>
559+
<li {...props2} key={props2.key}>
560560
{getOptionLabel(option)}
561561
</li>
562562
);

0 commit comments

Comments
 (0)