Studio Developer Manual / Version 2401
Table Of Contents
In some situation, it comes in handy to search for a feature instead instead of items.
For that reason, the quick search dialog support to register custom actions with keywords and make them searchable.
The BlueprintFormsStudioPlugin.ts
for example defines the following action:
new ConfigureQuickSearchPlugin({ ... actions: [ ... new QuickSearchActionConfiguration({ svgIcon: preferences, label: FrameComponents_properties.PreferenceWindow_title, additionalKeywords: [FrameComponents_properties.PreferenceWindow_shortcuts_text, FrameComponents_properties.PreferenceWindow_language_text, FrameComponents_properties.PreferenceWindow_SiteSelector_title, FrameComponents_properties.PreferenceWindow_dialogs_title, FrameComponents_properties.PreferenceWindow_shortcuts_text, ], action: (): void => { new OpenDialogAction({ dialogDefaults: Config(StudioPreferenceWindow, {}), }).execute(); }, }), ... ], ... })
Example 9.148. Quick Search Default Configuration
Here, an OpenDialogAction
is added to the quick search dialog which should open the preferences dialog.
The configuration defines an icon and label that is shown if the search term matches one of the
additionalKeywords
or the label of the action. The action
field
configures the function that is called if the user (single) clicks on the search result.