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

Function removeFilters

removeFilters(dashboard, filtersToRemove): DashboardProps

Creates a new dashboard instance with multiple filters removed.

This function removes all filters with the same GUID as the provided filters from the dashboard's 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) from which the specified filters are removed.
filtersToRemoveFilter[]An array of filters to remove.

Returns

DashboardProps

A new dashboard instance with the specified filters removed.

Example

Remove multiple filters from a dashboard.

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