sisense.com
✅ You are viewing documentation for the latest version of Compose SDK.
Version:

Function replaceFilters

replaceFilters(dashboard, newFilters): DashboardProps

Creates a new dashboard instance with its filters replaced by a new set of filters.

This function does not modify the original dashboard; instead, it returns a new dashboard with the updated filters.

Parameters

ParameterTypeDescription
dashboardDashboardPropsThe original dashboard (DashboardProps) whose filters are to be replaced.
newFiltersFilterRelations | Filter[]An array of new filters or filter relations to set on the dashboard.

Returns

DashboardProps

A new dashboard instance with the updated filters.

Example

Replace all filters on a dashboard with a new set of filters.

const existingDashboard: DashboardProps = {...}
const newFilters: Filter[] = [{...}, {...}, ...];
const updatedDashboard = dashboardHelpers.replaceFilters(existingDashboard, newFilters);
Last Updated: