applyAttributeFilter()
Creates the ChangeAttributeFilterSelection command.
export declare function applyAttributeFilter(filterLocalId: string, filter: IAttributeFilter, correlationId?: string): ChangeAttributeFilterSelection | ReplaceAttributeFilterItemSelection | undefined;
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 | ReplaceAttributeFilterItemSelection | undefined
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.