From b6d8c0e2d452a5da03c7966910b177c84cee9db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aar=C3=B3n=20Garc=C3=ADa=20Herv=C3=A1s?= Date: Mon, 24 Jun 2024 16:27:47 +0200 Subject: [PATCH] Fix React key spread warnings --- packages/mui-joy/src/Autocomplete/Autocomplete.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/mui-joy/src/Autocomplete/Autocomplete.tsx b/packages/mui-joy/src/Autocomplete/Autocomplete.tsx index 3601284ec7eeaa..96bbf5621d67ef 100644 --- a/packages/mui-joy/src/Autocomplete/Autocomplete.tsx +++ b/packages/mui-joy/src/Autocomplete/Autocomplete.tsx @@ -409,13 +409,14 @@ const Autocomplete = React.forwardRef(function Autocomplete( selectedOptions = renderTags(value as Array, getCustomizedTagProps, ownerState); } else { selectedOptions = (value as Array).map((option, index) => { + const { key: endDecoratorKey, ...endDecoratorProps } = getCustomizedTagProps({ index }); return ( } + endDecorator={} sx={{ minWidth: 0 }} > {getOptionLabel(option)}