From 4cec2fcf5b8f19d43738516df00c2d09a0c141df Mon Sep 17 00:00:00 2001 From: Albert Yu Date: Wed, 8 Nov 2023 15:02:58 +0800 Subject: [PATCH] Fix --- packages/mui-material/src/Autocomplete/Autocomplete.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/mui-material/src/Autocomplete/Autocomplete.js b/packages/mui-material/src/Autocomplete/Autocomplete.js index a2e39002f3302b..c946c2579c9d27 100644 --- a/packages/mui-material/src/Autocomplete/Autocomplete.js +++ b/packages/mui-material/src/Autocomplete/Autocomplete.js @@ -552,7 +552,14 @@ const Autocomplete = React.forwardRef(function Autocomplete(inProps, ref) { ); const renderGroup = renderGroupProp || defaultRenderGroup; - const defaultRenderOption = (props2, option) =>
  • {getOptionLabel(option)}
  • ; + const defaultRenderOption = (props2, option) => { + const { key, ...otherProps } = props2; + return ( +
  • + {getOptionLabel(option)} +
  • + ); + }; const renderOption = renderOptionProp || defaultRenderOption; const renderListOption = (option, index) => {