Developer
News and Updates
Get Support
Sign in
Get Support
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
UI Kit components
Jira UI Kit components
UI Kit hooks
Forge bridge APIs
Jira bridge APIs
Confluence bridge APIs
Dashboard bridge APIs
Upgrade UI Kit versions
Last updated Sep 25, 2026

useFilters (EAP)

Hook for accessing the persisted dashboard filter group and any session-only overrides.

For module configuration and setup instructions, see Dashboard filter (EAP).

Installation

Install Forge hooks using the @forge/hooks npm package. Import @forge/hooks using a bundler, such as Webpack.

Usage

To add the useFilters hook to your app:

1
2
import { useFilters } from "@forge/hooks/dashboards";

Here is an example of accessing persisted filters and overrides:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
import React from "react";
import { useFilters } from "@forge/hooks/dashboards";

function FilterSummary() {
  const { filterGroup, overrides } = useFilters();

  return (
    <div>
      <p>Root operator: {filterGroup?.operator}</p>
      <p>Active overrides: {Object.keys(overrides).length}</p>
    </div>
  );
}

Function signature

1
2
3
4
5
6
7
function useFilters(): UseFiltersResult;

interface UseFiltersResult {
  filterGroup: FilterGroup | null;
  overrides: Record<string, FilterOverride>;
}

For the FilterGroup and FilterOverride types, see the filter model.

Returns

  • filterGroup (FilterGroup | null): The persisted filter group for the dashboard filter.
  • overrides (Record<string, FilterOverride>): Session-only overrides keyed by filter ID.

Rate this page: