Skip to content

Commit

Permalink
Merge pull request #5044 from helenwilliamson/master
Browse files Browse the repository at this point in the history
Change to use length of values with useEffect in AutocompleteArrayInput
  • Loading branch information
Luwangel authored Aug 4, 2020
2 parents 9c45db2 + ba7f0d3 commit a99ea2d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit a99ea2d

Please sign in to comment.