addAttributeFilter()
Home > @gooddata/sdk-ui-dashboard > addAttributeFilter
addAttributeFilter() function
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Creates the AddAttributeFilter command. Dispatching this command will result in the addition of another attribute filter to the dashboard's filter bar, at desired position, or error in case of invalid update (e.g. wrong or duplicated displayForm)
The filter will be set for the display form provided by reference. When created, the filter will be no-op - all the elements will be selected.
Signature:
export declare function addAttributeFilter(displayForm: ObjRef, index: number, correlationId?: string, selectionMode?: DashboardAttributeFilterSelectionMode, mode?: DashboardAttributeFilterConfigMode, initialSelection?: IAttributeElements, initialIsNegativeSelection?: boolean, localIdentifier?: string, primaryDisplayForm?: ObjRef, title?: string): IAddAttributeFilter;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
displayForm |
specify attribute display form which will be used for filtering | |
|
index |
number |
specify index among the attribute filters at which the new filter should be placed. The index starts at zero and there is convenience that index of -1 would add the filter at the end. |
|
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. |
|
selectionMode |
(Optional) single or multi value selection mode of the filter. | |
|
mode |
(Optional) specify the visibility mode of attribute filter | |
|
initialSelection |
(Optional) specify the initial selection of attribute elements | |
|
initialIsNegativeSelection |
boolean |
(Optional) specify if the initial selection of attribute elements is a negative one |
|
localIdentifier |
string |
(Optional) local identifier |
|
primaryDisplayForm |
(Optional) specify the primary display form of attribute filter | |
|
title |
string |
(Optional) specify custom title of attribute filter |
Returns: