Browse Source

fix: ignore updating cell value on modifier key press

re #692

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/743/head
Pranav C 3 years ago
parent
commit
a6e9d6dbae
  1. 5
      packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue

5
packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue

@ -443,6 +443,11 @@ export default {
if (this.editEnabled.col != null && this.editEnabled.row != null) { if (this.editEnabled.col != null && this.editEnabled.row != null) {
return return
} }
if (e.ctrlKey ||
e.altKey ||
e.shiftKey ||
e.metaKey) { return }
if (e.key && e.key.length === 1) { if (e.key && e.key.length === 1) {
if (!this.isPkAvail && !this.data[this.selected.row].rowMeta.new) { if (!this.isPkAvail && !this.data[this.selected.row].rowMeta.new) {
return this.$toast.info('Update not allowed for table which doesn\'t have primary Key').goAway(3000) return this.$toast.info('Update not allowed for table which doesn\'t have primary Key').goAway(3000)

Loading…
Cancel
Save