Browse Source

fix(nc-gui): selected cell should not go away on pressing esc multiple times

pull/8192/head
Ramesh Mane 3 months ago
parent
commit
71c97b3f4a
  1. 6
      packages/nc-gui/components/cell/SingleSelect.vue
  2. 3
      packages/nc-gui/composables/useMultiSelect/index.ts

6
packages/nc-gui/components/cell/SingleSelect.vue

@ -254,12 +254,6 @@ const onKeydown = (e: KeyboardEvent) => {
if (e.key === 'Escape') {
isOpen.value = false
if (isForm.value) return
setTimeout(() => {
aselect.value?.$el.querySelector('.ant-select-selection-search > input').focus()
}, 100)
}
}

3
packages/nc-gui/composables/useMultiSelect/index.ts

@ -767,9 +767,6 @@ export function useMultiSelect(
// Handle escape
if (e.key === 'Escape') {
selectedRange.clear()
activeCell.col = null
activeCell.row = null
}
if (unref(editEnabled) || e.ctrlKey || e.altKey || e.metaKey) {

Loading…
Cancel
Save