@elemental/ui / Class

LmnFilterService

Decorators:@Injectable

Service to register and manage filters. Filters are grouped by a string key that represents the single group of filter.

Methods

addFilterToGroup()

Add filters to a group, if the group does not exist, it will be created. If the group already exists, the filters will be added to the existing ones.

Presentation
addFilterToGroup(group: string, newFilters: LmnFilter<unknown>[]): void;
Parameters
NameTypeDescription
group
string

@param group

newFilters
LmnFilter<unknown>[]

@param newFilters

Returns
void

getGroup()

Return the filters of a group. If the group does not exist, it will be created.

Presentation
getGroup(group: string): Signal<LmnFilter<unknown>[]>;
Parameters
NameTypeDescription
group
string

@param group

Returns
Signal<LmnFilter<unknown>[]>

removeAllGroup()

Remove all groups.

Presentation
removeAllGroup(): void;
Returns
void

removeFiltersFromGroup()

Remove a filter from a group.

Presentation
removeFiltersFromGroup(group: string, filterToRemove: LmnFilter<unknown>[]): void;
Parameters
NameTypeDescription
group
string

@param group

filterToRemove
LmnFilter<unknown>[]
Returns
void

removeGroup()

Remove a group.

Presentation
removeGroup(group: string): void;
Parameters
NameTypeDescription
group
string

@param group

Returns
void

replaceFiltersForGroup()

Replace the filters of a group with new ones.

Presentation
replaceFiltersForGroup(group: string, newFilters: LmnFilter<unknown>[]): void;
Parameters
NameTypeDescription
group
string

@param group

newFilters
LmnFilter<unknown>[]

@param newFilters

Returns
void