From e2877b0f26c7d5d318d11773e56e0ba5ede0888f 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 18:02:02 +0200 Subject: [PATCH] [joy-ui][Autocomplete] Fix React spread key warning (#42741) --- 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 dbbb1631332c72..b28696c7f720d6 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)}