mirror of
https://github.com/directus/directus.git
synced 2026-02-15 14:54:56 -05:00
finish adding own shortcut handler
This commit is contained in:
@@ -34,13 +34,14 @@ export default defineComponent({
|
||||
setup(props, { emit }) {
|
||||
const dialog = ref<HTMLElement | null>(null);
|
||||
useShortcut(
|
||||
'esc',
|
||||
() => {
|
||||
console.log('A', dialog.value);
|
||||
|
||||
emit('toggle', false);
|
||||
if (_active.value) {
|
||||
emitToggle();
|
||||
return true;
|
||||
}
|
||||
},
|
||||
ref(document.body)
|
||||
ref(document.body),
|
||||
'escape'
|
||||
);
|
||||
|
||||
const localActive = ref(false);
|
||||
|
||||
@@ -295,11 +295,11 @@ export default defineComponent({
|
||||
});
|
||||
|
||||
useShortcut(
|
||||
'mod+a',
|
||||
() => {
|
||||
onToggleSelectAll(!allItemsSelected.value);
|
||||
},
|
||||
table
|
||||
table,
|
||||
'meta+a'
|
||||
);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user