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

Function removeFilter

removeFilter(dashboard, filterToRemove): DashboardProps

Creates a new dashboard instance with a specific filter removed.

This function removes the filter with the same GUID as the provided filter 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 to remove the filter.
filterToRemoveFilterThe filter to be removed.

Returns

DashboardProps

A new dashboard instance with the specified filter removed.

Example

Remove a filter from a dashboard.

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