diff --git a/packages/ra-ui-materialui/src/input/AutocompleteArrayInput.tsx b/packages/ra-ui-materialui/src/input/AutocompleteArrayInput.tsx index d384ea208a0..11371528f42 100644 --- a/packages/ra-ui-materialui/src/input/AutocompleteArrayInput.tsx +++ b/packages/ra-ui-materialui/src/input/AutocompleteArrayInput.tsx @@ -218,7 +218,7 @@ const AutocompleteArrayInput: FunctionComponent< // would have to first clear the input before seeing any other choices useEffect(() => { handleFilterChange(''); - }, [...values, handleFilterChange]); + }, [values.join(','), handleFilterChange]); const handleKeyDown = useCallback( (event: React.KeyboardEvent) => {