@servicemind.tis/tis-smart-table-viewer 2.3.15 → 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.toggle(row);
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();