From bc089490b7aace384cf1a22705232a2390574745 Mon Sep 17 00:00:00 2001 From: "Anna (Anya) Parker" <50943381+anna-parker@users.noreply.github.com> Date: Mon, 20 Jan 2025 21:55:30 +0100 Subject: [PATCH] fix(components): add lapisFilter as dependency so that filter is reloaded upon change --- components/src/preact/lineageFilter/lineage-filter.tsx | 2 +- components/src/preact/locationFilter/location-filter.tsx | 2 +- components/src/preact/textInput/text-input.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/src/preact/lineageFilter/lineage-filter.tsx b/components/src/preact/lineageFilter/lineage-filter.tsx index 6c42fe48..1e3c3a46 100644 --- a/components/src/preact/lineageFilter/lineage-filter.tsx +++ b/components/src/preact/lineageFilter/lineage-filter.tsx @@ -51,7 +51,7 @@ const LineageFilterInner: FunctionComponent = ({ const { data, error, isLoading } = useQuery( () => fetchLineageAutocompleteList({ lapis, field: lapisField, lapisFilter }), - [lapisField, lapis], + [lapisField, lapis, lapisFilter], ); if (isLoading) { diff --git a/components/src/preact/locationFilter/location-filter.tsx b/components/src/preact/locationFilter/location-filter.tsx index f4713a8a..0673e901 100644 --- a/components/src/preact/locationFilter/location-filter.tsx +++ b/components/src/preact/locationFilter/location-filter.tsx @@ -44,7 +44,7 @@ export const LocationFilterInner = ({ value, fields, placeholderText, lapisFilte const { data, error, isLoading } = useQuery( () => fetchAutocompletionList({ fields, lapis, lapisFilter }), - [fields, lapis], + [fields, lapis, lapisFilter], ); if (isLoading) { diff --git a/components/src/preact/textInput/text-input.tsx b/components/src/preact/textInput/text-input.tsx index f010b26a..e9e1794d 100644 --- a/components/src/preact/textInput/text-input.tsx +++ b/components/src/preact/textInput/text-input.tsx @@ -50,7 +50,7 @@ const TextInputInner: FunctionComponent = ({ const { data, error, isLoading } = useQuery( () => fetchStringAutocompleteList({ lapis, field: lapisField, lapisFilter }), - [lapisField, lapis], + [lapisField, lapis, lapisFilter], ); if (isLoading) {