We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fdc832 commit ac2582aCopy full SHA for ac2582a
packages/mui-joy/src/Autocomplete/Autocomplete.tsx
@@ -632,9 +632,14 @@ const Autocomplete = React.forwardRef(function Autocomplete(
632
},
633
});
634
635
- const defaultRenderOption = (optionProps: any, option: unknown) => (
636
- <SlotOption {...optionProps}>{getOptionLabel(option)}</SlotOption>
637
- );
+ const defaultRenderOption = (optionProps: any, option: unknown) => {
+ const { key, ...rest } = optionProps;
+ return (
638
+ <SlotOption key={key} {...rest}>
639
+ {getOptionLabel(option)}
640
+ </SlotOption>
641
+ );
642
+ };
643
644
const renderOption = renderOptionProp || defaultRenderOption;
645
0 commit comments