Browse Source

fix(nc-gui): extra patch request

pull/5340/head
Wing-Kam Wong 2 years ago
parent
commit
6851b33687
  1. 7
      packages/nc-gui/components/smartsheet/Cell.vue

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

@ -118,11 +118,10 @@ const vModel = computed({
}, },
}) })
const syncAndNavigate = (dir: NavigateDir, e: KeyboardEvent) => { const navigate = (dir: NavigateDir, e: KeyboardEvent) => {
if (isJSON(column.value)) return if (isJSON(column.value)) return
if (currentRow.value.rowMeta.changed || currentRow.value.rowMeta.new) { if (currentRow.value.rowMeta.changed || currentRow.value.rowMeta.new) {
emit('save')
currentRow.value.rowMeta.changed = false currentRow.value.rowMeta.changed = false
} }
emit('navigate', dir) emit('navigate', dir)
@ -159,8 +158,8 @@ const onContextmenu = (e: MouseEvent) => {
{ 'text-blue-600': isPrimary(column) && !props.virtual && !isForm }, { 'text-blue-600': isPrimary(column) && !props.virtual && !isForm },
{ 'nc-grid-numeric-cell': isGrid && !isForm && isNumericField }, { 'nc-grid-numeric-cell': isGrid && !isForm && isNumericField },
]" ]"
@keydown.enter.exact="syncAndNavigate(NavigateDir.NEXT, $event)" @keydown.enter.exact="navigate(NavigateDir.NEXT, $event)"
@keydown.shift.enter.exact="syncAndNavigate(NavigateDir.PREV, $event)" @keydown.shift.enter.exact="navigate(NavigateDir.PREV, $event)"
@contextmenu="onContextmenu" @contextmenu="onContextmenu"
> >
<template v-if="column"> <template v-if="column">

Loading…
Cancel
Save