Defines a global filter that renders in the Insights page action bar, next to the
built-in date range picker. The filter's value is shared with every widget on the
page, which can read it via useWidgetFilters().filters[id]. Filter state is
session-only (it is not persisted).
interface DashboardWidgetFilterDefinition<T = any> { id: string; component: React.ComponentType<DashboardWidgetFilterComponentProps<T>>; defaultValue?: T;}stringA unique identifier for the filter. Widgets read the filter's value via
useWidgetFilters().filters[id]. Registering two filters with the same id
logs a warning and ignores the duplicate.
React.ComponentType<DashboardWidgetFilterComponentProps<T>>The React component rendered in the action bar. It receives the current value
and an onChange callback (see DashboardWidgetFilterComponentProps).
TThe value the filter starts with on page load, before the user changes it.
The props passed to a global insights filter's action-bar component. The component
is a controlled input: it renders the current value and calls onChange when the
user picks a new one.
interface DashboardWidgetFilterComponentProps<T = any> { value: T; onChange: (value: T) => void;}