diff --git a/packages/erd-editor/src/components/erd-editor/useErdEditorAttachElement.ts b/packages/erd-editor/src/components/erd-editor/useErdEditorAttachElement.ts index 5b29d525..e695f0eb 100644 --- a/packages/erd-editor/src/components/erd-editor/useErdEditorAttachElement.ts +++ b/packages/erd-editor/src/components/erd-editor/useErdEditorAttachElement.ts @@ -40,7 +40,7 @@ import { hasDatabaseVendor, toSafeString } from '@/utils/validation'; import { ErdEditorElement, ErdEditorProps } from './ErdEditor'; -const ExternalKeyBindingNameList = omit(KeyBindingNameList, [ +const hasOmitKeyBindingName = arrayHas([ KeyBindingName.edit, KeyBindingName.stop, KeyBindingName.search, @@ -48,7 +48,11 @@ const ExternalKeyBindingNameList = omit(KeyBindingNameList, [ KeyBindingName.redo, KeyBindingName.zoomIn, KeyBindingName.zoomOut, -]) as string[]; +]); + +const ExternalKeyBindingNameList = KeyBindingNameList.filter( + key => !hasOmitKeyBindingName(key) +); const defaultThemeOptions: ThemeOptions = { grayColor: GrayColor.slate,