Исправлена ошибка заполнения массива фильтров

This commit is contained in:
Александр Сироткин 2022-01-13 20:39:38 +05:00
parent 1b42f77fef
commit 83d40e5396

View File

@ -4,7 +4,7 @@ export const makeTextOnFilter = (key: string) =>
export const makeTextFilters = (array: Record<string, unknown>[], keys: string[]) => {
const filters: string[][] = Array(keys.length)
filters.forEach((_, idx) => filters[idx] = [])
for (let i = 0; i < keys.length; filters[i++] = []);
array.forEach((row) => {
if (!row) return