IAttributeFilterLoader
Handles the loading of the all required metadata for the attribute filter handler.
export interface IAttributeFilterLoader extends IAttributeLoader, IAttributeElementLoader
Extends: IAttributeLoader, IAttributeElementLoader
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
Registers a callback that will be fired when the initialization was canceled. Returns unsubscribe function, that will unregister it. | |||
Registers a callback that will be fired when error is thrown during the initialization. Returns unsubscribe function, that will unregister it. | |||
Registers a callback that will be fired when the initialization starts. Returns unsubscribe function, that will unregister it, once called. | |||
Registers a callback that will be fired when the initialization is successfuly completed. Returns unsubscribe function, that will unregister it. | |||
CallbackRegistration<void> | Registers a callback that will be fired when some data of the attribute filter handler has been changed/updated. Returns unsubscribe function, that will unregister it. |
Methods
Method | Description |
|---|---|
Get the effective filter for execution. | |
Get the filter to display in component, including custom displayAsLabel applied. Note: This filter is not used for execution and can be completely the same as getFilter one. | |
Returns error, if it was thrown during the initialization, undefined otherwise. | |
Returns the current status of the initialization. | |
Get original filter used for initialization During initialization process of migration to primary label could happen | |
init(correlation, skipElementsLoading, preserveWorkingSelection) | Loads all the required data to initialize the attribute filter handler: attribute, selected attribute elements, initial elements page and optionally elements total count (for filters with parent). |
Property details
IAttributeFilterLoader.onInitCancelproperty
Registers a callback that will be fired when the initialization was canceled. Returns unsubscribe function, that will unregister it.
onInitCancel: CallbackRegistration<OnInitCancelCallbackPayload>;
Remarks
Multiple callbacks can be registered by this function.
IAttributeFilterLoader.onInitErrorproperty
Registers a callback that will be fired when error is thrown during the initialization. Returns unsubscribe function, that will unregister it.
onInitError: CallbackRegistration<OnInitErrorCallbackPayload>;
Remarks
Multiple callbacks can be registered by this function.
IAttributeFilterLoader.onInitStartproperty
Registers a callback that will be fired when the initialization starts. Returns unsubscribe function, that will unregister it, once called.
onInitStart: CallbackRegistration<OnInitStartCallbackPayload>;
Remarks
Multiple callbacks can be registered by this function.
IAttributeFilterLoader.onInitSuccessproperty
Registers a callback that will be fired when the initialization is successfuly completed. Returns unsubscribe function, that will unregister it.
onInitSuccess: CallbackRegistration<OnInitSuccessCallbackPayload>;
Remarks
Multiple callbacks can be registered by this function.
IAttributeFilterLoader.onUpdateproperty
Registers a callback that will be fired when some data of the attribute filter handler has been changed/updated. Returns unsubscribe function, that will unregister it.
onUpdate: CallbackRegistration<void>;
Remarks
Multiple callbacks can be registered by this function.
Method details
IAttributeFilterLoader.getFilter()method
Get the effective filter for execution.
getFilter(): IAttributeFilter;
Returns
IAttributeFilterLoader.getFilterToDisplay()method
Get the filter to display in component, including custom displayAsLabel applied. Note: This filter is not used for execution and can be completely the same as getFilter one.
getFilterToDisplay(): IAttributeFilter;
Returns
IAttributeFilterLoader.getInitError()method
Returns error, if it was thrown during the initialization, undefined otherwise.
getInitError(): GoodDataSdkError | undefined;
Returns
GoodDataSdkError | undefined
IAttributeFilterLoader.getInitStatus()method
Returns the current status of the initialization.
getInitStatus(): AsyncOperationStatus;
Returns
IAttributeFilterLoader.getOriginalFilter()method
Get original filter used for initialization During initialization process of migration to primary label could happen
getOriginalFilter(): IAttributeFilter | undefined;
Returns
IAttributeFilter | undefined
IAttributeFilterLoader.init()method
Loads all the required data to initialize the attribute filter handler: attribute, selected attribute elements, initial elements page and optionally elements total count (for filters with parent).
init(correlation?: Correlation, skipElementsLoading?: boolean, preserveWorkingSelection?: boolean): void;
Parameters
Parameter | Type | Description |
|---|---|---|
correlation | (Optional) correlation that will be included in all callbacks fired by this method | |
skipElementsLoading | boolean | (Optional) when true, only loads attribute metadata (skips elements, selection, total count) |
preserveWorkingSelection | boolean | (Optional) when true, keeps the current working/committed selection instead of re-deriving it from the filter (used when switching back to elements mode from text mode) |
Returns
void
Remarks
Cancels the running initialization, if any, and starts it again.
Throws error if you combine staticElements with unsupported elements load options (limitingAttributeFilters, limitingMeasures or limitingDateFilters).
You can provide a correlation that will be included in the payload of all callbacks fired as a result of calling this method.