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
class="nc-cell w-full"
:class="[`nc-cell-${(column?.uidt || 'default').toLowerCase()}`, { 'text-blue-600': isPrimary && !virtual && !isForm }]"
@keydown.stop.left
@keydown.stop.right
@keydown.stop.up
@keydown.stop.down
@keydown.stop.enter.exact="syncAndNavigate(NavigateDir.NEXT)"
@keydown.stop.shift.enter.exact="syncAndNavigate(NavigateDir.PREV)"
@keydown.enter.exact="syncAndNavigate(NavigateDir.NEXT)"
@keydown.shift.enter.exact="syncAndNavigate(NavigateDir.PREV)"
>
<LazyCellTextArea v-if="isTextArea" 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>
<div
class="nc-virtual-cell w-full"
@keydown.stop.enter.exact="emit('navigate', NavigateDir.NEXT)"
@keydown.stop.shift.enter.exact="emit('navigate', NavigateDir.PREV)"
@keydown.enter.exact="emit('navigate', NavigateDir.NEXT)"
@keydown.shift.enter.exact="emit('navigate', NavigateDir.PREV)"
>
<LazyVirtualCellHasMany v-if="isHm" />
<LazyVirtualCellManyToMany v-else-if="isMm" />

Loading…
Cancel
Save