Browse Source

feat(gui): navigate to next row cell on enter

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

2
packages/nc-gui/components/project/spreadsheet/components/editableCell.vue

@ -5,7 +5,7 @@
@keydown.stop.right @keydown.stop.right
@keydown.stop.up @keydown.stop.up
@keydown.stop.down @keydown.stop.down
@keydown.stop.enter="cahnged=false,$emit('save')" @keydown.stop.enter="cahnged=false,$emit('save'),$emit('navigateToNext')"
> >
<editable-attachment-cell <editable-attachment-cell
v-if="isAttachment" v-if="isAttachment"

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

@ -219,6 +219,7 @@
@cancel="editEnabled = {}" @cancel="editEnabled = {}"
@update="onCellValueChange(col, row, columnObj)" @update="onCellValueChange(col, row, columnObj)"
@change="onCellValueChange(col, row, columnObj)" @change="onCellValueChange(col, row, columnObj)"
@navigateToNext="navigateToNext"
/> />
<table-cell <table-cell
@ -536,6 +537,11 @@ export default {
onCellValueChange(col, row, column, ev) { onCellValueChange(col, row, column, ev) {
this.$emit('onCellValueChange', col, row, column, ev) this.$emit('onCellValueChange', col, row, column, ev)
}, },
navigateToNext() {
if (this.selected.row < this.rowLength - 1) {
this.selected.row++
}
},
addNewRelationTab(...args) { addNewRelationTab(...args) {
this.$emit('addNewRelationTab', ...args) this.$emit('addNewRelationTab', ...args)
}, },

Loading…
Cancel
Save