From 9f53f980276f0d498c7a0f2d23c67cf2f9876158 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:59:43 +0530 Subject: [PATCH] Revert "fix: add event handler based activeCell status" This reverts commit 539f0c2e95e34c09def9c3f5db48c4af54548d3c. --- packages/nc-gui/components/cell/MultiSelect.vue | 6 +++--- packages/nc-gui/components/cell/SingleSelect.vue | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/nc-gui/components/cell/MultiSelect.vue b/packages/nc-gui/components/cell/MultiSelect.vue index 7a22788276..e2569578cc 100644 --- a/packages/nc-gui/components/cell/MultiSelect.vue +++ b/packages/nc-gui/components/cell/MultiSelect.vue @@ -48,11 +48,11 @@ const readOnly = inject(ReadonlyInj)! const isEditable = inject(EditModeInj, ref(false)) -const activeCell = inject(ActiveCellInj, ref(false)) +const _active = inject(ActiveCellInj, ref(false)) // use both ActiveCellInj or EditModeInj to determine the active state // since active will be false in case of form view -const active = computed(() => activeCell.value || isEditable.value) +const active = computed(() => _active.value || isEditable.value) const isPublic = inject(IsPublicInj, ref(false)) @@ -180,7 +180,7 @@ watch(isOpen, (n, _o) => { } }) -useSelectedCellKeyupListener(activeCell, (e) => { +useSelectedCellKeyupListener(active, (e) => { switch (e.key) { case 'Escape': isOpen.value = false diff --git a/packages/nc-gui/components/cell/SingleSelect.vue b/packages/nc-gui/components/cell/SingleSelect.vue index d05eab3966..3b9dafbadb 100644 --- a/packages/nc-gui/components/cell/SingleSelect.vue +++ b/packages/nc-gui/components/cell/SingleSelect.vue @@ -42,11 +42,11 @@ const readOnly = inject(ReadonlyInj)! const isEditable = inject(EditModeInj, ref(false)) -const activeCell = inject(ActiveCellInj, ref(false)) +const _active = inject(ActiveCellInj, ref(false)) // use both ActiveCellInj or EditModeInj to determine the active state // since active will be false in case of form view -const active = computed(() => activeCell.value || isEditable.value) +const active = computed(() => _active.value || isEditable.value) const aselect = ref() @@ -119,7 +119,7 @@ watch(isOpen, (n, _o) => { } }) -useSelectedCellKeyupListener(activeCell, (e) => { +useSelectedCellKeyupListener(active, (e) => { switch (e.key) { case 'Escape': isOpen.value = false