useWidgetFilters()
Hook for obtaining the effective filters for a widget.
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 | (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.