From 6d15c94dbe90f20bf40c041c6275d51ec80deecb Mon Sep 17 00:00:00 2001 From: femsci Date: Sun, 22 Oct 2023 10:17:12 +0200 Subject: [PATCH] Full search, case insensitive --- .../components/WarningsList/WarningsList.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/Nyanlabs.SFood.UI/sfood/src/components/WarningsList/WarningsList.tsx b/src/Nyanlabs.SFood.UI/sfood/src/components/WarningsList/WarningsList.tsx index 5145e70..47e6871 100644 --- a/src/Nyanlabs.SFood.UI/sfood/src/components/WarningsList/WarningsList.tsx +++ b/src/Nyanlabs.SFood.UI/sfood/src/components/WarningsList/WarningsList.tsx @@ -163,7 +163,20 @@ const WarningsList: React.FC = () => { return true; } - return ((x.col7 as any).val as string).includes(searchValue); + return ( + ((x.col7 as any).val as string) + .toLowerCase() + .includes(searchValue.toLowerCase()) || + ((x.col3 as any).val as string) + .toLowerCase() + .includes(searchValue.toLowerCase()) || + ((x.col6 as any).val as string) + .toLowerCase() + .includes(searchValue.toLowerCase()) || + ((x.col9 as any).val as string) + .toLowerCase() + .includes(searchValue.toLowerCase()) + ); }) .map((warningContent, key) => ( {

{(currentlySelectedWarning as any).col5.val}

-

firma

+

producent