close

Filter

loading table of contents...

Studio Developer Manual / Version 2110

Table Of Contents

9.15.5.2 Add Custom Search Filter to Search Filter List

Use the AddItemsPlugin to add your custom filter to the Studio Library filter section. The component to configure is the SearchFilters class if a filter should be added for the content search.

import Config from "@jangaroo/runtime/Config";
import Component from "@jangaroo/ext-ts/Component";
import SearchFilters from "@coremedia/studio-client.main.editor-components/sdk/collectionview/search/SearchFilters";
import AddItemsPlugin from "@coremedia/studio-client.ext.ui-components/plugins/AddItemsPlugin";
import FooFilterPanel from "./FooFilterPanel";

Config(SearchFilters, {
  plugins: [
    Config(AddItemsPlugin, {
      items: [
        Config(FooFilterPanel, {
          itemId: "fooFilter",
        }),
      ],
      after: [
        Config(Component, { itemId: SearchFilters.LAST_EDITED_FILTER_ITEM_ID }),
      ],
    }),
  ],
})

You can also open the library in a certain filter state, for example from a button in the favorites toolbar. To that end, the ShowCollectionViewAction provides a property filters that can take SearchFilterState objects. So that the action can configure the correct filter, the filterId attribute must be given, matching the itemId of the configured filter panel. The names and values of the attributes are exactly the property names and values of the state bean used by the filter set.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

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