useWidgetFilters()
Home > @gooddata/sdk-ui-dashboard > useWidgetFilters
useWidgetFilters() function
Hook for obtaining the effective filters for a widget.
Signature:
export declare function useWidgetFilters(widget: FilterableDashboardWidget | undefined | null, insight?: IInsightDefinition): QueryProcessingState<IFilter[]>;
Parameters
Parameter | Type | Description |
---|---|---|
widget | FilterableDashboardWidget | undefined | null | widget to get effective filters for |
insight | IInsightDefinition | (Optional) insight to evaluate the filters for in context of the widget |
Returns:
QueryProcessingState<IFilter[]>
set of filters that should be used to execute the given widget
Remarks
The filters returned should be used with insightSetFilters() to obtain insight that is ready for execution.