@trudb/tru-common-lib 0.2.305 → 0.2.307

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.
@@ -7650,6 +7650,7 @@ class TruDataGrid {
7650
7650
  animateRows: false,
7651
7651
  suppressRowTransform: true,
7652
7652
  rowSelection: 'multiple',
7653
+ suppressRowClickSelection: true,
7653
7654
  rowStyle: { background: 'white' },
7654
7655
  loadingOverlayComponent: TruDataGridLoadingOverlay,
7655
7656
  loadingOverlayComponentParams: {
@@ -8114,6 +8115,9 @@ class TruDataGrid {
8114
8115
  }
8115
8116
  };
8116
8117
  onCellMouseDown = (cellData) => {
8118
+ this.rowSelectedOnMousedown = cellData.node.isSelected();
8119
+ };
8120
+ onCellClicked = (cellData) => {
8117
8121
  let target = cellData.event.target;
8118
8122
  if (!target.classList.contains('ag-cell-last-left-pinned')) {
8119
8123
  cellData.api.deselectAll();
@@ -8121,10 +8125,14 @@ class TruDataGrid {
8121
8125
  else {
8122
8126
  if (!cellData.event.shiftKey) {
8123
8127
  if (cellData.event.ctrlKey) {
8124
- if (cellData.node.isSelected())
8128
+ if (this.rowSelectedOnMousedown) {
8125
8129
  cellData.node.setSelected(false);
8126
- else
8130
+ if (target.classList.contains('ag-row-focus'))
8131
+ target.classList.remove('ag-row-focus');
8132
+ }
8133
+ else {
8127
8134
  cellData.node.setSelected(true);
8135
+ }
8128
8136
  }
8129
8137
  else {
8130
8138
  cellData.api.deselectAll();
@@ -8135,10 +8143,6 @@ class TruDataGrid {
8135
8143
  }
8136
8144
  }
8137
8145
  };
8138
- onCellClicked = (cellData) => {
8139
- cellData.event.stopPropagation();
8140
- cellData.event.preventDefault();
8141
- };
8142
8146
  onRowClicked = (rowData) => {
8143
8147
  rowData.event.stopPropagation();
8144
8148
  rowData.event.preventDefault();