The <salla-filters>
web component is used to filter data in a variety of ways, such as by text, by date, or by number. They can also be used to filter data based on the user's input. They are easy to use and can be customized to meet the specific needs of the Theme.Example#
It is important to ensure adding the filters component in the Twilight.json file, for the component to work when calling the <salla-filters>
web component. Skipping this step could lead to the component's inability to work. Usage#
Properties#
Property | Attribute | Description | Type | Default |
---|
Filters | -- | Lists down the filter values | Filter[] | undefined |
Events#
Event | Description | Type |
---|
changed | This event will be fired when the selected filter changes in its value | CustomEvent<any> |
Methods#
The pre-defined methods
allow for calling functions built by Salla to carry out certain actvities, such as getFilters
which gets the data for filtering.Method | Description | Return Type |
---|
applyFilters() | Applies a filter to a view. | Promise<void> |
getFilters() | Gets the data that is available for filtering. | Promise<object> |
resetFilters() | Resets the selected filter to its default state. | Promise<void> |
Modified at 2024-08-18 08:37:51