@trudb/tru-common-lib 0.2.154 → 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[
|
|
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);
|
|
@@ -6102,7 +6104,7 @@ class TruDataGridCellRenderer {
|
|
|
6102
6104
|
}
|
|
6103
6105
|
};
|
|
6104
6106
|
onCopy = (event) => {
|
|
6105
|
-
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);
|
|
6106
6108
|
};
|
|
6107
6109
|
onPaste = (event) => {
|
|
6108
6110
|
this.dataGridClipboard.pasteCell(this.params, this.params.data, this.params.data.$entity);
|