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

Function addFilters

addFilters(dashboard, newFilters): DashboardProps

Creates a new dashboard instance with additional filters added to its existing filters.

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

Parameters

ParameterTypeDescription
dashboardDashboardPropsThe original dashboard (DashboardProps) to which the filters will be added.
newFiltersFilter[]An array of filters to add to the dashboard.

Returns

DashboardProps

A new dashboard instance with the new filters added.

Example

Add multiple new filters to a dashboard.

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