From d1657fae5155c588fba5d8b830fc57f07ffebd16 Mon Sep 17 00:00:00 2001 From: justin-dupre Date: Sun, 14 Mar 2021 06:57:43 -0500 Subject: [PATCH] add props.query to dependency list --- GooglePlacesAutocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GooglePlacesAutocomplete.js b/GooglePlacesAutocomplete.js index 21b2bb5b..94b857c5 100644 --- a/GooglePlacesAutocomplete.js +++ b/GooglePlacesAutocomplete.js @@ -525,7 +525,7 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => { }; // eslint-disable-next-line react-hooks/exhaustive-deps - const debounceData = useMemo(() => debounce(_request, props.debounce), []); + const debounceData = useMemo(() => debounce(_request, props.debounce), [props.query]); const _onChangeText = (text) => { setStateText(text);