filter-mixin

The filter mixin is a post-processor mixin, compatible with list-mixin. It provides the ability for the user to dynamically filter a list of resources.

Used by:

Attributes

filtered-by

Target a <solid-form-search> used to filter current list of resource.

Example:

<solid-form-search
    id="my-filter"
    fields="email"
    label-email="search by email"
></solid-form-search>

<solid-display
    data-src="http://server/users"
    fields="username, last_name, email"
    filtered-by="my-filter"
></solid-display>

search-fields deprecated

The properties you want to use to filter the list of resources. You can add multiple fields, separated by a comma.

In this example, a solid-form with a username input and a email input is created. Each time the user types something in one input, the list is filtered.

<solid-display
    data-src="http://server/users"
    fields="username, email, first_name, last_name"
    search-fields="username, email"
></solid-display>

You can customize the generated solid-form by adding an attribute which starts by search-. It will be automatically added to the solid-form, without the prefix search-.

  • search-value-[field]: The default value of [field]

  • search-label-[field]: Set the label for [field]

  • search-widget-[field]: The form widget of [field]

  • search-range-[field]: The range of values of [field]