diff --git a/packages/mui-base/src/useAutocomplete/useAutocomplete.test.js b/packages/mui-base/src/useAutocomplete/useAutocomplete.test.js
index 264f0ee8f67ce2..9eeadda0cb3001 100644
--- a/packages/mui-base/src/useAutocomplete/useAutocomplete.test.js
+++ b/packages/mui-base/src/useAutocomplete/useAutocomplete.test.js
@@ -31,7 +31,12 @@ describe('useAutocomplete', () => {
{groupedOptions.length > 0 ? (
{groupedOptions.map((option, index) => {
- return - {option}
;
+ const { key, ...optionProps } = getOptionProps({ option, index });
+ return (
+ -
+ {option}
+
+ );
})}
) : null}
diff --git a/packages/mui-material/src/Autocomplete/Autocomplete.js b/packages/mui-material/src/Autocomplete/Autocomplete.js
index 301c876212c78f..cfa68d8f35827e 100644
--- a/packages/mui-material/src/Autocomplete/Autocomplete.js
+++ b/packages/mui-material/src/Autocomplete/Autocomplete.js
@@ -552,14 +552,18 @@ const Autocomplete = React.forwardRef(function Autocomplete(inProps, ref) {
if (renderTags) {
startAdornment = renderTags(value, getCustomizedTagProps, ownerState);
} else {
- startAdornment = value.map((option, index) => (
-
- ));
+ startAdornment = value.map((option, index) => {
+ const { key, ...customTagProps } = getCustomizedTagProps({ index });
+ return (
+
+ );
+ });
}
}
diff --git a/packages/mui-material/src/Autocomplete/Autocomplete.test.js b/packages/mui-material/src/Autocomplete/Autocomplete.test.js
index 9446aa9aed4a29..226ae973423958 100644
--- a/packages/mui-material/src/Autocomplete/Autocomplete.test.js
+++ b/packages/mui-material/src/Autocomplete/Autocomplete.test.js
@@ -638,7 +638,10 @@ describe('', () => {
renderTags={(value, getTagProps) =>
value
.filter((x, index) => index === 1)
- .map((option, index) => )
+ .map((option, index) => {
+ const { key, ...tagProps } = getTagProps({ index });
+ return ;
+ })
}
onChange={handleChange}
renderInput={(params) => }