Don't filter repeater results when filter is null

This commit is contained in:
Andrew Kingston 2021-02-11 14:27:27 +00:00
parent 17a9e44ef6
commit 6df2f2b1a1
1 changed files with 5 additions and 3 deletions

View File

@ -36,9 +36,11 @@
} }
let filteredData = [...rows] let filteredData = [...rows]
Object.keys(filter).forEach(field => { Object.keys(filter).forEach(field => {
if (filter[field].value != null && filter[field].value !== "") {
filteredData = filteredData.filter(row => { filteredData = filteredData.filter(row => {
return row[field] === filter[field].value return row[field] === filter[field].value
}) })
}
}) })
return filteredData return filteredData
} }