Browse Source

feat(nc-gui): click enter to open modal, click enter again to attach file

pull/4482/head
Wing-Kam Wong 2 years ago
parent
commit
cd56d6bf1e
  1. 7
      packages/nc-gui/components/cell/attachment/index.vue

7
packages/nc-gui/components/cell/attachment/index.vue

@ -150,7 +150,12 @@ watch(
useSelectedCellKeyupListener(inject(ActiveCellInj, ref(false)), (e) => {
if (e.key === 'Enter' && !isReadonly.value) {
e.stopPropagation()
modalVisible.value = true
if (!modalVisible.value) {
modalVisible.value = true
} else {
// click Attach File button
;(document.querySelector('.nc-attachment-modal.active .nc-attach-file') as HTMLDivElement)?.click()
}
}
})
</script>

Loading…
Cancel
Save