1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-03-06 15:36:49 +02:00

16 lines
401 B
TypeScript
Raw Normal View History

import { CommandRuntime, CommandDeclaration } from 'lib/services/CommandService';
import { _ } from 'lib/locale';
export const declaration:CommandDeclaration = {
name: 'focusSearch',
label: () => _('Search in all the notes'),
};
2020-09-15 14:01:07 +01:00
export const runtime = (searchBarRef:any):CommandRuntime => {
return {
execute: async () => {
2020-09-15 14:01:07 +01:00
if (searchBarRef.current) searchBarRef.current.focus();
},
};
};