@servicemind.tis/tis-smart-table-viewer 2.3.14 → 2.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2516,7 +2516,16 @@ class TisSmartTableViewerComponent {
|
|
|
2516
2516
|
if (this.onlySingleSelection && status.checked) {
|
|
2517
2517
|
this.selection.clear();
|
|
2518
2518
|
}
|
|
2519
|
-
this.selection.
|
|
2519
|
+
const found = this.selection?.selected.find((el) => {
|
|
2520
|
+
return el[this.selectedRowKey] == row[this.selectedRowKey];
|
|
2521
|
+
});
|
|
2522
|
+
if (found) {
|
|
2523
|
+
this.selection?.deselect(found);
|
|
2524
|
+
}
|
|
2525
|
+
else {
|
|
2526
|
+
this.selection?.select(row);
|
|
2527
|
+
}
|
|
2528
|
+
// this.selection.toggle(row);
|
|
2520
2529
|
this.selectedRows = this.selection.selected;
|
|
2521
2530
|
this.selectedRowsChange.emit(this.selectedRows);
|
|
2522
2531
|
this.checkAllRowsSelected();
|
|
@@ -2543,7 +2552,9 @@ class TisSmartTableViewerComponent {
|
|
|
2543
2552
|
this.dataSource.apiSubject.value.forEach(row => {
|
|
2544
2553
|
// ✅ Validate each row before selecting
|
|
2545
2554
|
if (row && ValidationHelper.hasRowKey(row, this.selectedRowKey)) {
|
|
2546
|
-
this.
|
|
2555
|
+
if (!this.isChecked(row)) {
|
|
2556
|
+
this.selection.select(row);
|
|
2557
|
+
}
|
|
2547
2558
|
}
|
|
2548
2559
|
});
|
|
2549
2560
|
}
|