Components Filters Filter

Filter

Overview API Examples

Work in progress

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

The LmnFilter abstract class provides the foundation for building custom filter components that integrate with the Elemental UI filtering system. It standardizes how filters communicate with containers and manage selection state.

Built-in Filter Components

All filter components in Elemental UI extend the LmnFilter abstract class, ensuring consistent behavior and integration with the filter container system. The built-in filter components include:

  • LmnFilterSingleSelectionComponent: Allows users to select a single option from a list of choices
  • LmnFilterMultipleSelectionComponent: Enables selection of multiple options from a list
  • LmnFilterRangeComponent: Provides a way to filter based on a range of values

These components automatically handle registration with parent containers, state management, and change detection, making them ready to use in your applications with minimal configuration.

Common Features

All built-in filters share these capabilities:

  • Automatic registration with parent filter containers
  • Consistent API for setting and retrieving values
  • Standard event emission for change detection
  • Clear functionality that integrates with container-level clearing

Technical Implementation

Core Functionality

  • State Management: Handles selection state with built-in methods for selecting, clearing, and retrieving values
  • Container Integration: Allows to be integrated with LmnFilterContainerDirective through a standardized API
  • Event System: Emits changes through consistent events that containers can listen for

Developer Requirements

When extending LmnFilter, you must:

  1. Implement all abstract methods
  2. Provide a unique filterId for proper tracking
  3. Properly propagate selection changes to the parent container