Skip to content

Commit

Permalink
fix tag search in advanced search
Browse files Browse the repository at this point in the history
  • Loading branch information
Abradat committed Nov 12, 2024
1 parent f8f0efd commit f58e3be
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 f58e3be

Please sign in to comment.