Skip to content

Commit

Permalink
fix(components): add lapisFilter as dependency so that filter is relo…
Browse files Browse the repository at this point in the history
…aded upon change
  • Loading branch information
anna-parker authored and JonasKellerer committed Jan 21, 2025
1 parent a42abb9 commit bc08949
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 @@ -51,7 +51,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 bc08949

Please sign in to comment.