# 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
Parameter | Type | Description |
---|---|---|
dashboard | DashboardProps | The original dashboard (DashboardProps ) to which the filter will be added. |
newFilter | Filter | The filter to add to the dashboard. |
# Returns
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 = addFilter(existingDashboard, newFilter);