Components Filters Filter

Filter

Overview API Examples

The LmnFilter is an abstract class that can be extended to create a new custom filter and can be used in a LmnFilterContainerDirective.

Implementing a custom filter

This example demonstrates how to implement a custom filter by extending the LmnFilter abstract class. The custom filter component handles selection logic, maintains state, and expose an API for interacting with the filter. Below is a complete implementation showing how to create a filter with both standard input radio options and a special option that reveals allow to select a custom duration with a slider.

Interaction with custom filter

This example demonstrates how to interact with the custom filter component. The filter created in the previous example is integrated into a parent component and demonstrates how to listen for changes, retrieve the selected values, and clear the filter. This example use directly the API selectedValues to retrieve the selected values, but it's possible to use the selectedValuesChange event to listen for changes and retrieve and manage the selected values to work with them.