@trudb/tru-common-lib 0.2.306 → 0.2.308

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.
@@ -8115,8 +8115,11 @@ class TruDataGrid {
8115
8115
  }
8116
8116
  };
8117
8117
  onCellMouseDown = (cellData) => {
8118
+ this.rowSelectedOnMousedown = cellData.node.isSelected();
8118
8119
  };
8119
8120
  onCellClicked = (cellData) => {
8121
+ };
8122
+ onRowClicked = (cellData) => {
8120
8123
  let target = cellData.event.target;
8121
8124
  if (!target.classList.contains('ag-cell-last-left-pinned')) {
8122
8125
  cellData.api.deselectAll();
@@ -8124,10 +8127,14 @@ class TruDataGrid {
8124
8127
  else {
8125
8128
  if (!cellData.event.shiftKey) {
8126
8129
  if (cellData.event.ctrlKey) {
8127
- if (cellData.node.isSelected())
8130
+ if (this.rowSelectedOnMousedown) {
8128
8131
  cellData.node.setSelected(false);
8129
- else
8132
+ if (target.classList.contains('ag-row-focus'))
8133
+ target.classList.remove('ag-row-focus');
8134
+ }
8135
+ else {
8130
8136
  cellData.node.setSelected(true);
8137
+ }
8131
8138
  }
8132
8139
  else {
8133
8140
  cellData.api.deselectAll();
@@ -8138,13 +8145,11 @@ class TruDataGrid {
8138
8145
  }
8139
8146
  }
8140
8147
  };
8141
- onRowClicked = (rowData) => {
8142
- rowData.event.stopPropagation();
8143
- rowData.event.preventDefault();
8144
- };
8145
- onCellDoubleClicked = (gridConfig) => {
8146
- if (gridConfig.colDef.cellClass === 'ag-pk-aligned-cell')
8147
- this.config.rowHeaderDoubleClicked(gridConfig);
8148
+ onCellDoubleClicked = (cellData) => {
8149
+ if (cellData.colDef.cellClass === 'ag-pk-aligned-cell') {
8150
+ if (!cellData.event.ctrlKey && !cellData.event.shiftKey)
8151
+ this.config.rowHeaderDoubleClicked(cellData);
8152
+ }
8148
8153
  };
8149
8154
  onCellKeyDown = (params) => {
8150
8155
  if (!params.event)