Skip to content

Commit

Permalink
fix(component): add lapisFilter as dependency so that filter is reloa…
Browse files Browse the repository at this point in the history
…ded upon change
  • Loading branch information
anna-parker committed Jan 20, 2025
1 parent 4aef6a9 commit 277c82b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/src/preact/lineageFilter/lineage-filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const LineageFilterInner: FunctionComponent<LineageFilterInnerProps> = ({

const { data, error, isLoading } = useQuery(
() => fetchLineageAutocompleteList({ lapis, field: lapisField, lapisFilter }),
[lapisField, lapis],
[lapisField, lapis, lapisFilter],
);

if (isLoading) {
Expand Down
2 changes: 1 addition & 1 deletion components/src/preact/locationFilter/location-filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion components/src/preact/textInput/text-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const TextInputInner: FunctionComponent<TextInputInnerProps> = ({

const { data, error, isLoading } = useQuery(
() => fetchStringAutocompleteList({ lapis, field: lapisField, lapisFilter }),
[lapisField, lapis],
[lapisField, lapis, lapisFilter],
);

if (isLoading) {
Expand Down

0 comments on commit 277c82b

Please sign in to comment.