Browse Source

refactor(nc-gui): remove key event stopper from cells

pull/3669/head
braks 2 years ago committed by Raju Udava
parent
commit
31933a9647
  1. 8
      packages/nc-gui/components/smartsheet/Cell.vue
  2. 4
      packages/nc-gui/components/smartsheet/VirtualCell.vue

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

@ -138,12 +138,8 @@ const syncAndNavigate = (dir: NavigateDir) => {
<div <div
class="nc-cell w-full" class="nc-cell w-full"
:class="[`nc-cell-${(column?.uidt || 'default').toLowerCase()}`, { 'text-blue-600': isPrimary && !virtual && !isForm }]" :class="[`nc-cell-${(column?.uidt || 'default').toLowerCase()}`, { 'text-blue-600': isPrimary && !virtual && !isForm }]"
@keydown.stop.left @keydown.enter.exact="syncAndNavigate(NavigateDir.NEXT)"
@keydown.stop.right @keydown.shift.enter.exact="syncAndNavigate(NavigateDir.PREV)"
@keydown.stop.up
@keydown.stop.down
@keydown.stop.enter.exact="syncAndNavigate(NavigateDir.NEXT)"
@keydown.stop.shift.enter.exact="syncAndNavigate(NavigateDir.PREV)"
> >
<LazyCellTextArea v-if="isTextArea" v-model="vModel" /> <LazyCellTextArea v-if="isTextArea" v-model="vModel" />
<LazyCellCheckbox v-else-if="isBoolean" v-model="vModel" /> <LazyCellCheckbox v-else-if="isBoolean" v-model="vModel" />

4
packages/nc-gui/components/smartsheet/VirtualCell.vue

@ -28,8 +28,8 @@ const { isLookup, isBt, isRollup, isMm, isHm, isFormula, isCount } = useVirtualC
<template> <template>
<div <div
class="nc-virtual-cell w-full" class="nc-virtual-cell w-full"
@keydown.stop.enter.exact="emit('navigate', NavigateDir.NEXT)" @keydown.enter.exact="emit('navigate', NavigateDir.NEXT)"
@keydown.stop.shift.enter.exact="emit('navigate', NavigateDir.PREV)" @keydown.shift.enter.exact="emit('navigate', NavigateDir.PREV)"
> >
<LazyVirtualCellHasMany v-if="isHm" /> <LazyVirtualCellHasMany v-if="isHm" />
<LazyVirtualCellManyToMany v-else-if="isMm" /> <LazyVirtualCellManyToMany v-else-if="isMm" />

Loading…
Cancel
Save