File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,12 +31,13 @@ export const filteredIcons = derived(
3131 [ icons , searchTerm , selectedTags ] ,
3232 ( [ $icons , $searchTerm , $selectedTags ] ) => {
3333 return $icons . filter ( icon => {
34- const matchesSearch = $searchTerm === '' ||
35- icon . name . toLowerCase ( ) . includes ( $searchTerm . toLowerCase ( ) ) ;
36-
37- const matchesTags = $selectedTags . length === 0 ||
34+ const matchesSearch = $searchTerm === '' ||
35+ icon . name . toLowerCase ( ) . includes ( $searchTerm . toLowerCase ( ) ) ||
36+ icon . altnames . some ( altname => altname . toLowerCase ( ) . includes ( $searchTerm . toLowerCase ( ) ) ) ;
37+
38+ const matchesTags = $selectedTags . length === 0 ||
3839 ( icon . tags && $selectedTags . every ( tag => icon . tags . includes ( tag ) ) ) ;
39-
40+
4041 return matchesSearch && matchesTags ;
4142 } ) ;
4243 }
@@ -86,4 +87,4 @@ export function toggleDarkMode() {
8687
8788 export function closeIconModal ( ) {
8889 isModalOpen . set ( false ) ;
89- }
90+ }
You can’t perform that action at this time.
0 commit comments