Skip to content

Commit

Permalink
fix(KaotoIOgh-40): Make catalog filter case insensitive and use also …
Browse files Browse the repository at this point in the history
…title
  • Loading branch information
mkralik3 committed Aug 22, 2023
1 parent 1934cfe commit 15e013c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/ui/src/components/Catalog/Catalog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ export const Catalog: FunctionComponent<PropsWithChildren<CatalogProps>> = (prop
useEffect(() => {
setFilteredTiles(
props.tiles[activeGroup]?.filter((tile) => {
return tile.name.includes(searchTerm) || tile.tags.some((tag) => tag.includes(searchTerm));
return (
tile.name.toLowerCase().includes(searchTerm.toLowerCase()) ||
tile.title.toLowerCase().includes(searchTerm.toLowerCase()) ||
tile.tags.some((tag) => tag.toLowerCase().includes(searchTerm.toLowerCase()))
);
}),
);
}, [searchTerm, activeGroup, props.tiles]);
Expand Down

0 comments on commit 15e013c

Please sign in to comment.