mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
fix(defineShortcuts): return useEventListener to unregister the listener
Resolves #2031
This commit is contained in:
@@ -202,5 +202,5 @@ export function defineShortcuts(config: MaybeRef<ShortcutsConfig>, options: Shor
|
||||
}).filter(Boolean) as Shortcut[]
|
||||
})
|
||||
|
||||
useEventListener('keydown', onKeyDown)
|
||||
return useEventListener('keydown', onKeyDown)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user