# Class FiltersPanelComponent
Filters panel component that renders a list of filter tiles
# Example
Here's how to render a filters panel with a set of filters.
<!--Component HTML template in example.component.html-->
<csdk-filters-panel
[filters]="filtersPanelProps.filters"
[defaultDataSource]="filtersPanelProps.defaultDataSource"
(filtersChange)="filtersPanelProps.filtersChange($event)"
/>
// Component behavior in example.component.ts
import { Component } from '@angular/core';
import { type FiltersPanelProps } from '@sisense/sdk-ui-angular';
import { filterFactory } from '@sisense/sdk-data';
import * as DM from '../../assets/sample-healthcare-model';
@Component({
selector: 'example',
templateUrl: './example.component.html',
styleUrls: ['./example.component.scss'],
})
export class ExampleComponent {
filtersPanelProps: FiltersPanelProps = {
filters: [
filterFactory.members(DM.ER.Date.Years, ['2013-01-01T00:00:00']),
filterFactory.members(DM.ER.Departments.Department, ['Cardiology']),
],
defaultDataSource: DM.DataSource,
filtersChange({ filters }) {
this.filtersPanelProps.filters = filters;
},
};
}
# Implements
AfterViewInit
OnChanges
OnDestroy
# Constructors
# constructor
new FiltersPanelComponent(
sisenseContextService
,themeService
):FiltersPanelComponent
Constructor for the FiltersPanelComponent
.
# Parameters
Parameter | Type | Description |
---|---|---|
sisenseContextService | SisenseContextService | Sisense context service |
themeService | ThemeService | Theme service |
# Returns
# Properties
# Constructor
# sisenseContextService
sisenseContextService:
SisenseContextService
Sisense context service
# themeService
themeService:
ThemeService
Theme service
# Other
# config
config:
FiltersPanelConfig
|undefined
The configuration for the filters panel
# defaultDataSource
defaultDataSource:
DataSource
|undefined
Default data source used for filter tiles
# filters
filters:
FilterRelations
|Filter
[]
Array of filters to display
# filtersChange
filtersChange:
EventEmitter
<FiltersPanelChangeEvent
>
Callback to handle changes in filters