@trudb/tru-common-lib 0.2.161 → 0.2.162
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.
|
@@ -5993,9 +5993,31 @@ class TruDataGridClipboard {
|
|
|
5993
5993
|
params.api.refreshCells({ force: true });
|
|
5994
5994
|
}
|
|
5995
5995
|
};
|
|
5996
|
-
copyRow = (tableName, copiedRows) => {
|
|
5996
|
+
copyRow = async (tableName, copiedRows) => {
|
|
5997
5997
|
this.tableName = tableName;
|
|
5998
5998
|
this.copiedRows = copiedRows;
|
|
5999
|
+
if (this.copiedRows.length) {
|
|
6000
|
+
let multiRowString = '';
|
|
6001
|
+
this.copiedRows.forEach((copiedRow, index) => {
|
|
6002
|
+
let rowPropertyValues = [];
|
|
6003
|
+
let properties = copiedRow.entityType.getPropertyNames();
|
|
6004
|
+
properties
|
|
6005
|
+
.forEach((propertyName) => {
|
|
6006
|
+
if (propertyName !== tableName + 'Ref' &&
|
|
6007
|
+
propertyName !== 'rowver' &&
|
|
6008
|
+
propertyName !== 'Merge_Data_Set' &&
|
|
6009
|
+
!propertyName.startsWith('o'))
|
|
6010
|
+
rowPropertyValues.push(copiedRow.getProperty(propertyName));
|
|
6011
|
+
});
|
|
6012
|
+
multiRowString += rowPropertyValues.join('\t') + '\n';
|
|
6013
|
+
});
|
|
6014
|
+
try {
|
|
6015
|
+
await navigator.clipboard.writeText(multiRowString);
|
|
6016
|
+
}
|
|
6017
|
+
catch (err) {
|
|
6018
|
+
console.error('Failed to copy text: ', err);
|
|
6019
|
+
}
|
|
6020
|
+
}
|
|
5999
6021
|
};
|
|
6000
6022
|
pasteRow = (gridApi, config, selectedRows) => {
|
|
6001
6023
|
if (this.tableName !== config.tableName) {
|