Update Configs.tsx with some changes in getData() method while filtering.

This commit is contained in:
Malav Mevada 2023-07-31 15:47:05 +05:30 committed by GitHub
parent 282885f96d
commit 8c0d67bd88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,7 @@ const Configs: React.FC = () => {
return data
.filter((item) => {
const nameMatch = item.name.toLocaleLowerCase().includes(keyword);
return nameMatch ? true : item.value && item.value.includes(keyword); // try to match the keyword on any of the item.value elements when nameMatch fails but item.value exists
return nameMatch ? true : item.value && item.value.toLocaleLowerCase().includes(keyword); // try to match the keyword on any of the item.value elements when nameMatch fails but item.value exists
})
.sort((a, b) => {
if (a.source === b.source) return 0;