applyAttributeFilter()
Home > @gooddata/sdk-ui-dashboard > applyAttributeFilter
applyAttributeFilter() function
Creates the ChangeAttributeFilterSelection command.
Signature:
export declare function applyAttributeFilter(filterLocalId: string, filter: IAttributeFilter, correlationId?: string): ChangeAttributeFilterSelection;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
filterLocalId |
string |
dashboard attribute filter's local id |
|
filter |
attribute filter to apply | |
|
correlationId |
string |
(Optional) specify correlation id to use for this command. this will be included in all events that will be emitted during the command processing |
Returns:
ChangeAttributeFilterSelection
Remarks
Dispatching this command will result in application of element selection for the dashboard attribute filter with the provided id, or error in case of invalid update (e.g. non-existing filterLocalId).
The ChangeAttributeFilterSelectionPayload's selectionType and elements are derived from the provided attribute filter.
To convert IDashboardFilter to IFilter use dashboardAttributeFilterToAttributeFilter(). Converted filter can be used within the command's payload.