useWidgetFilters()
Home > @gooddata/sdk-ui-dashboard > useWidgetFilters
useWidgetFilters() function
Hook for obtaining the effective filters for a widget.
Signature:
export declare function useWidgetFilters(widget: ExtendedDashboardWidget | undefined, insight?: IInsightDefinition): QueryProcessingState<IFilter[]>;
Parameters
Parameter | Type | Description |
---|---|---|
widget | ExtendedDashboardWidget | undefined | 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.