diff --git a/frontend/src/app/projects/project-overview/project-overview.component.html b/frontend/src/app/projects/project-overview/project-overview.component.html index ff608fe0c..f950f8d69 100644 --- a/frontend/src/app/projects/project-overview/project-overview.component.html +++ b/frontend/src/app/projects/project-overview/project-overview.component.html @@ -3,6 +3,20 @@ ~ SPDX-License-Identifier: Apache-2.0 --> +
+ + Search + + search + +
+
@@ -15,12 +29,12 @@
- +
this.searchAndSortProjects(query!)), + ); + + searchAndSortProjects(query: string) { + return this.projectService.projects$.pipe( + map((projects) => + projects?.filter((project) => + project.name.toLocaleLowerCase().includes(query.toLocaleLowerCase()), + ), + ), + map((projects) => projects?.sort((a, b) => a.name.localeCompare(b.name))), + ); + } + constructor(public projectService: ProjectWrapperService) {} ngOnInit() {