@trudb/tru-common-lib 0.2.153 → 0.2.156

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.
@@ -5965,21 +5965,23 @@ class TruDataGridClipboard {
5965
5965
  columnName = null;
5966
5966
  copiedCellData = null;
5967
5967
  copiedCellEntity = null;
5968
+ copiedCellParams = null;
5968
5969
  copiedRows = [];
5969
5970
  constructor(util, uiNotification) {
5970
5971
  this.util = util;
5971
5972
  this.uiNotification = uiNotification;
5972
5973
  }
5973
- copyCell = (tableName, columnName, copiedCellData, copiedCellEntity) => {
5974
+ copyCell = (params, tableName, columnName, copiedCellData, copiedCellEntity) => {
5974
5975
  this.tableName = tableName;
5975
5976
  this.columnName = columnName;
5977
+ this.copiedCellParams = params;
5976
5978
  this.copiedCellData = copiedCellData;
5977
5979
  this.copiedCellEntity = copiedCellEntity;
5978
5980
  };
5979
5981
  pasteCell = (params, pastedCellData, pastedCell) => {
5980
5982
  let colDef = params.colDef;
5981
5983
  let columnName = colDef.field;
5982
- let copiedCellDataTypeName = this.copiedCellData[params.colDef?.field].property.typeName;
5984
+ let copiedCellDataTypeName = this.copiedCellData[this.copiedCellParams?.colDef?.field].property.typeName;
5983
5985
  let pastedCellDataTypeName = pastedCellData[params.colDef?.field].property.typeName;
5984
5986
  if (!colDef.editable) {
5985
5987
  this.uiNotification.error('Cannot paste into a non-editable column: ' + colDef.field);
@@ -5989,8 +5991,10 @@ class TruDataGridClipboard {
5989
5991
  this.uiNotification.error('Clipboard data type does not match the current cell data type: ' + copiedCellDataTypeName + ' vs ' + pastedCellDataTypeName);
5990
5992
  return;
5991
5993
  }
5992
- else
5994
+ else {
5993
5995
  pastedCell.setProperty(columnName, this.copiedCellEntity?.getProperty(columnName));
5996
+ params.api.refreshCells({ force: true });
5997
+ }
5994
5998
  };
5995
5999
  copyRow = (tableName, copiedRows) => {
5996
6000
  this.tableName = tableName;
@@ -6100,7 +6104,7 @@ class TruDataGridCellRenderer {
6100
6104
  }
6101
6105
  };
6102
6106
  onCopy = (event) => {
6103
- this.dataGridClipboard.copyCell(this.params.context.grid.config.tableName, this.params.colDef?.field, this.params.data, this.params.data.$entity);
6107
+ this.dataGridClipboard.copyCell(this.params, this.params.context.grid.config.tableName, this.params.colDef?.field, this.params.data, this.params.data.$entity);
6104
6108
  };
6105
6109
  onPaste = (event) => {
6106
6110
  this.dataGridClipboard.pasteCell(this.params, this.params.data, this.params.data.$entity);