mirror of https://github.com/Fabio286/antares.git
fix: cell copy returns "undefined" in some conditions, closes #170
This commit is contained in:
parent
020ce36312
commit
8fb1f0803e
|
@ -136,7 +136,7 @@
|
|||
"clean-webpack-plugin": "^4.0.0",
|
||||
"cross-env": "^7.0.2",
|
||||
"css-loader": "^6.5.0",
|
||||
"electron": "^16.0.1",
|
||||
"electron": "^16.0.7",
|
||||
"electron-builder": "^22.14.11",
|
||||
"electron-devtools-installer": "^3.2.0",
|
||||
"eslint": "^7.32.0",
|
||||
|
|
|
@ -403,10 +403,11 @@ export default {
|
|||
};
|
||||
this.$emit('update-field', params);
|
||||
},
|
||||
copyCell () {
|
||||
copyCell (event) {
|
||||
const row = this.localResults.find(row => this.selectedRows.includes(row._antares_id));
|
||||
const cellName = Object.keys(row).find(prop => [
|
||||
this.selectedCell.field,
|
||||
this.selectedCell.orgField,
|
||||
`${this.fields[0].table}.${this.selectedCell.field}`,
|
||||
`${this.fields[0].tableAlias}.${this.selectedCell.field}`
|
||||
].includes(prop));
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
:key="cKey"
|
||||
class="td p-0"
|
||||
tabindex="0"
|
||||
@contextmenu.prevent="openContext($event, { id: row._antares_id, field: cKey })"
|
||||
@contextmenu.prevent="openContext($event, { id: row._antares_id, orgField: cKey })"
|
||||
>
|
||||
<template v-if="cKey !== '_antares_id'">
|
||||
<span
|
||||
|
@ -526,7 +526,7 @@ export default {
|
|||
return this.keyUsage.find(key => key.field === keyName);
|
||||
},
|
||||
openContext (event, payload) {
|
||||
payload.field = this.fields[payload.field].name;// Ensures field name only
|
||||
payload.field = this.fields[payload.orgField].name;// Ensures field name only
|
||||
payload.isEditable = this.isEditable;
|
||||
this.$emit('contextmenu', event, payload);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue