1
0
Fork 0
mirror of synced 2024-09-08 21:51:58 +12:00

simplify add all method

This commit is contained in:
Peter Clement 2022-02-22 15:56:11 +00:00
parent dffdcd882f
commit 8531b9fd40

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 =>