1
0
Fork 0
mirror of synced 2024-09-29 08:41:16 +13:00

simplify add all method

This commit is contained in:
Peter Clement 2022-02-22 15:56:11 +00:00
parent 53c207691c
commit 4a119afb15

View file

@ -222,15 +222,7 @@
}
if (e.detail) {
let rowsToAdd = []
rows.map(x =>
selectedRows
.map(y => rows.map(x => x._id).indexOf(y._id))
.includes(true)
? null
: rowsToAdd.push(x)
)
selectedRows = [...selectedRows, ...rowsToAdd]
selectedRows = [...selectedRows, ...rows]
} else {
//remove every object from selectedRows that is not in rows
let filtered = selectedRows.filter(el =>