changeWorkingAttributeFilterSelection()
Home > @gooddata/sdk-ui-dashboard > changeWorkingAttributeFilterSelection
changeWorkingAttributeFilterSelection() function
Creates the ChangeAttributeFilterSelection command for working filter.
Signature:
export declare function changeWorkingAttributeFilterSelection(filterLocalId: string, elements: IAttributeElements, selectionType: AttributeFilterSelectionType, correlationId?: string, isSelectionInvalid?: boolean): ChangeAttributeFilterSelection;
Parameters
| Parameter | Type | Description | 
|---|---|---|
| filterLocalId | string | dashboard attribute filter's local id | 
| elements | elements | |
| selectionType | selection type. either 'IN' or 'NOT_IN' | |
| 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 | 
| isSelectionInvalid | boolean | (Optional) | 
Returns:
ChangeAttributeFilterSelection
Remarks
see resetAttributeFilterSelection() for convenience function to select all attribute elements of particular filter.
See also applyAttributeFilter() for convenient function when you have an IAttributeFilter instance.
Example
const selectionType = isPositiveAttributeFilter ? "IN" : "NOT_IN";
To create this command without a need to calculate the payload values from a IFilter object, we recommend to use applyAttributeFilter() command creator instead.