From 31592712a44707c1bd0b3eab6fd43e1abaacdbce Mon Sep 17 00:00:00 2001 From: Jens L Date: Tue, 14 Nov 2023 11:49:11 +0100 Subject: [PATCH] web/elements: keep selected elements in table when fetching (#7519) Signed-off-by: Jens Langhammer --- web/src/elements/table/Table.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/web/src/elements/table/Table.ts b/web/src/elements/table/Table.ts index 642af4801..6175b5296 100644 --- a/web/src/elements/table/Table.ts +++ b/web/src/elements/table/Table.ts @@ -194,7 +194,6 @@ export abstract class Table extends AKElement { this.data = await this.apiEndpoint(this.page); this.error = undefined; this.page = this.data.pagination.current; - const newSelected: T[] = []; const newExpanded: T[] = []; this.data.results.forEach((res) => { const jsonRes = JSON.stringify(res); @@ -214,18 +213,12 @@ export abstract class Table extends AKElement { ); }; } - - const selectedIndex = this.selectedElements.findIndex(comp); - if (selectedIndex > -1) { - newSelected.push(res); - } const expandedIndex = this.expandedElements.findIndex(comp); if (expandedIndex > -1) { newExpanded.push(res); } }); this.isLoading = false; - this.selectedElements = newSelected; this.expandedElements = newExpanded; } catch (ex) { this.isLoading = false;