# 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

Parameter Type Description
dashboard DashboardProps The original dashboard (DashboardProps) from which to remove the filter.
filterToRemove Filter The 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 = removeFilter(existingDashboard, filterToRemove);