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

Function addFilter

addFilter(dashboard, newFilter): DashboardProps

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

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

Parameters

ParameterTypeDescription
dashboardDashboardPropsThe original dashboard (DashboardProps) to which the filter will be added.
newFilterFilterThe filter to add to the dashboard.

Returns

DashboardProps

A new dashboard instance with the new filter added.

Example

Add a new filter to a dashboard.

const existingDashboard: DashboardProps = {...};
const newFilter: Filter = {...};
const updatedDashboard = dashboardHelpers.addFilter(existingDashboard, newFilter);
Last Updated: