From 8531b9fd409561291ca59ffbed4c2a3ab8973ec9 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Tue, 22 Feb 2022 15:56:11 +0000 Subject: [PATCH] simplify add all method --- packages/bbui/src/Table/Table.svelte | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/bbui/src/Table/Table.svelte b/packages/bbui/src/Table/Table.svelte index 727bfd6c91..48983e8514 100644 --- a/packages/bbui/src/Table/Table.svelte +++ b/packages/bbui/src/Table/Table.svelte @@ -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 =>