From 7e89fdf333b8830ed60917c756a8232cc8721d24 Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Thu, 15 Aug 2024 01:49:35 +0100 Subject: [PATCH] fix(templates): improve search and fix key issues (#8549) --- packages/app/src/app/components/Create/CreateBox.tsx | 9 +++++++-- packages/app/src/app/components/Create/TemplateList.tsx | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/app/src/app/components/Create/CreateBox.tsx b/packages/app/src/app/components/Create/CreateBox.tsx index 03cd1c99af5..bf3361d4335 100644 --- a/packages/app/src/app/components/Create/CreateBox.tsx +++ b/packages/app/src/app/components/Create/CreateBox.tsx @@ -82,8 +82,10 @@ export const CreateBox: React.FC = ({ if (searchQuery) { filteredTemplates = filteredTemplates.filter(template => { return ( - template.title?.toLowerCase().includes(searchQuery) || - template.tags.some(tag => tag.includes(searchQuery)) + template.title?.toLowerCase().includes(searchQuery.toLowerCase()) || + template.tags.some(tag => + tag.toLowerCase().includes(searchQuery.toLowerCase()) + ) ); }); } @@ -272,6 +274,7 @@ export const CreateBox: React.FC = ({ = ({ )} = ({ ) : ( {templates.map(template => (