Skip to content

Commit

Permalink
Merge pull request #1972 from bcgov/bugfix/ALCS-2358-2
Browse files Browse the repository at this point in the history
Fix Tag Search in Advanced Search
  • Loading branch information
Abradat authored Nov 12, 2024
2 parents f8f0efd + f58e3be commit e9b5148
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions alcs-frontend/src/app/features/search/search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,15 +454,13 @@ export class SearchComponent implements OnInit, OnDestroy {

private filterTags(value: string): TagDto[] {
const filterValue = value.toLowerCase();
return this.allTags.filter(
(tag) => {
if (filterValue) {
return !this.tags.includes(tag) && tag.name.toLowerCase().startsWith(filterValue)
} else {
return !this.tags.includes(tag);
}
return this.allTags.filter((tag) => {
if (filterValue) {
return !this.tags.includes(tag) && tag.name.toLowerCase().includes(filterValue);
} else {
return !this.tags.includes(tag);
}
);
});
}

private updateFilteredTags(): void {
Expand Down

0 comments on commit e9b5148

Please sign in to comment.