mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-18 09:35:20 +02:00
17792d91a1
Co-authored-by: Siddhant Sehgal <ssehgal@makelearningbetter.co>
16 lines
421 B
TypeScript
16 lines
421 B
TypeScript
import { CommandRuntime, CommandDeclaration } from '@joplin/lib/services/CommandService';
|
|
import { _ } from '@joplin/lib/locale';
|
|
|
|
export const declaration: CommandDeclaration = {
|
|
name: 'focusSearch',
|
|
label: () => _('Search in all the notes'),
|
|
};
|
|
|
|
export const runtime = (searchBarRef: any): CommandRuntime => {
|
|
return {
|
|
execute: async () => {
|
|
if (searchBarRef.current) searchBarRef.current.select();
|
|
},
|
|
};
|
|
};
|