From 1301fc427fa11dbb8ce3f5f3fd756f440a94ed35 Mon Sep 17 00:00:00 2001 From: ray Date: Thu, 8 Feb 2024 17:05:32 -0800 Subject: [PATCH] DBC22-313: made search text case-insensitive and included captions --- src/frontend/src/pages/CamerasListPage.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/pages/CamerasListPage.js b/src/frontend/src/pages/CamerasListPage.js index 8a05cc0aa..af5ee56e0 100644 --- a/src/frontend/src/pages/CamerasListPage.js +++ b/src/frontend/src/pages/CamerasListPage.js @@ -90,7 +90,10 @@ export default function CamerasListPage() { useEffect(() => { const filteredCams = !searchText ? processedCameras : - processedCameras.filter((pc) => pc.name.toLowerCase().includes(searchText)); + processedCameras.filter( + (pc) => pc.name.toLowerCase().includes(searchText.toLowerCase()) || + pc.caption.toLowerCase().includes(searchText.toLowerCase()) + ); setDisplayedCameras(filteredCams);