From 7699a4e738edc76ac55ee2139a82032b3287d16b Mon Sep 17 00:00:00 2001 From: rutujaac Date: Thu, 12 Sep 2024 17:17:41 +0530 Subject: [PATCH] pushed statement to one level up --- pebblo/app/pebblo-ui/src/components/applicationList.js | 2 +- pebblo/app/pebblo-ui/src/components/snippetDetails.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pebblo/app/pebblo-ui/src/components/applicationList.js b/pebblo/app/pebblo-ui/src/components/applicationList.js index bed3ca6f..6f4d865f 100644 --- a/pebblo/app/pebblo-ui/src/components/applicationList.js +++ b/pebblo/app/pebblo-ui/src/components/applicationList.js @@ -52,8 +52,8 @@ export function ApplicationsList(props) { function onChange(evt) { let filteredData; if (evt.target.value) { + const searchValue = evt.target.value.toLocaleLowerCase(); filteredData = tableData?.filter((item) => { - const searchValue = evt.target.value.toLocaleLowerCase(); const isMatch = searchField?.some((sch) => item[sch]?.toLocaleLowerCase()?.includes(searchValue) ); diff --git a/pebblo/app/pebblo-ui/src/components/snippetDetails.js b/pebblo/app/pebblo-ui/src/components/snippetDetails.js index 8d23b284..e7ced3ee 100644 --- a/pebblo/app/pebblo-ui/src/components/snippetDetails.js +++ b/pebblo/app/pebblo-ui/src/components/snippetDetails.js @@ -106,8 +106,8 @@ export function SnippetDetails(props) { function onChange(evt) { let filteredData; if (evt.target.value) { + const searchValue = evt.target.value.toLocaleLowerCase(); filteredData = snippetList?.filter((item) => { - const searchValue = evt.target.value.toLocaleLowerCase(); const isMatch = searchField?.some((sch) => item[sch]?.toLocaleLowerCase()?.includes(searchValue) );