Browse Source

Merge pull request #5340 from nocodb/fix/extra-patch

fix(nc-gui): extra patch request
pull/5350/head
աɨռɢӄաօռɢ 2 years ago committed by GitHub
parent
commit
13c9541a84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      packages/nc-gui/components/smartsheet/Cell.vue

7
packages/nc-gui/components/smartsheet/Cell.vue

@ -121,11 +121,10 @@ const vModel = computed({
},
})
const syncAndNavigate = (dir: NavigateDir, e: KeyboardEvent) => {
const navigate = (dir: NavigateDir, e: KeyboardEvent) => {
if (isJSON(column.value)) return
if (currentRow.value.rowMeta.changed || currentRow.value.rowMeta.new) {
emit('save')
currentRow.value.rowMeta.changed = false
}
emit('navigate', dir)
@ -163,8 +162,8 @@ const onContextmenu = (e: MouseEvent) => {
{ 'nc-grid-numeric-cell': isGrid && !isForm && isNumericField },
{ 'h-[40px]': !props.editEnabled && isForm && !isSurveyForm },
]"
@keydown.enter.exact="syncAndNavigate(NavigateDir.NEXT, $event)"
@keydown.shift.enter.exact="syncAndNavigate(NavigateDir.PREV, $event)"
@keydown.enter.exact="navigate(NavigateDir.NEXT, $event)"
@keydown.shift.enter.exact="navigate(NavigateDir.PREV, $event)"
@contextmenu="onContextmenu"
>
<template v-if="column">

Loading…
Cancel
Save