Skip to content

Commit

Permalink
Fixed ordering when any of the groups dissapeared or renamed
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrBohuslavskyi committed Aug 9, 2024
1 parent fb371b2 commit 80591ff
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,18 @@ export class ListingsTableComponent implements OnInit {
x.label !== 'First Nations Community'
);

const sorted = [municipality, regional, other, firstNations];

if (uncategorized.length) {
const sorted = [];

if (municipality)
sorted.push(municipality);
if (regional)
sorted.push(regional);
if (other)
sorted.push(other);
if (firstNations)
sorted.push(firstNations);
if (uncategorized.length)
sorted.push(...uncategorized);
}

this.groupedCommunities = sorted;
}
Expand Down

0 comments on commit 80591ff

Please sign in to comment.