Skip to content

Commit

Permalink
fix(frontend): the localities select was empty when no intercommunali…
Browse files Browse the repository at this point in the history
…ty was selected
  • Loading branch information
Falinor committed Dec 18, 2024
1 parent 9dc787e commit 11d2831
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ function HousingListFiltersSidemenu(props: Props) {
const localityOptions =
localities
?.filter((locality) => {
if (!filters.intercommunalities?.length) {
return true;
}

const set = new Set(
intercommunalities
?.filter((interco) =>
Expand Down Expand Up @@ -297,6 +301,7 @@ function HousingListFiltersSidemenu(props: Props) {
loading: isFetching,
multiple: true,
openOnFocus: true,
size: 'small',
getOptionKey: (option) => option.id,
getOptionLabel: (option) => option.name,
isOptionEqualToValue: (option, value) => option.id === value.id,
Expand Down

0 comments on commit 11d2831

Please sign in to comment.