close

Filter

loading table of contents...

Studio Developer Manual / Version 2307

Table Of Contents

9.33.2 Search for Custom Actions

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.147. 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.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.