fix(ui): fix filterlist method

This commit is contained in:
sylenien 2022-11-28 12:56:45 +01:00
parent ad11ba4d06
commit 9d36aefc7c

View file

@ -72,7 +72,7 @@ export const filterList = <T extends Record<string, any>>(
if (searchQuery === '') return list;
const filterRE = getRE(searchQuery, 'i');
let _list = list.filter((listItem: T) => {
return testKeys.some((key) => filterRE.test(listItem[key]) || searchCb?.(listItem, filterRE));
return testKeys.some((key) => filterRE.test(listItem[key])) || searchCb?.(listItem, filterRE);
});
return _list;
}