Browse Source

feat(nc-gui): keyboard manoeuvre - cmd/ctrl + Enter

pull/4482/head
Wing-Kam Wong 2 years ago
parent
commit
efd7697546
  1. 13
      packages/nc-gui/components/smartsheet/expanded-form/Header.vue

13
packages/nc-gui/components/smartsheet/expanded-form/Header.vue

@ -58,6 +58,19 @@ const copyRecordUrl = () => {
) )
message.success('Copied to clipboard') message.success('Copied to clipboard')
} }
useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
const cmdOrCtrl = isMac() ? e.metaKey : e.ctrlKey
if (cmdOrCtrl) {
switch (e.key) {
case 'Enter': {
if (isUIAllowed('tableRowUpdate')) {
await save()
}
}
}
}
})
</script> </script>
<template> <template>

Loading…
Cancel
Save