only fire for 2 grouped filters

This commit is contained in:
Martin McKeaveney 2024-12-09 14:01:47 +00:00
parent e5453cc766
commit 7d5ca8449f
2 changed files with 1 additions and 2 deletions

View File

@ -14,7 +14,6 @@ const EXCLUDED_EVENTS: Event[] = [
Event.DATASOURCE_UPDATED,
Event.QUERY_UPDATED,
Event.VIEW_UPDATED,
Event.VIEW_FILTER_UPDATED,
Event.VIEW_CALCULATION_UPDATED,
Event.AUTOMATION_TRIGGER_UPDATED,
Event.USER_GROUP_UPDATED,

View File

@ -169,7 +169,7 @@ async function handleViewFilterEvents(existingView: ViewV2, view: ViewV2) {
const properties = { filterGroups, tableId: view.tableId }
if (
filterGroups >= 2 &&
((existingView && existingView?.queryUI?.groups?.length) || 0)
filterGroups > (existingView?.queryUI?.groups?.length || 0)
) {
await events.view.filterUpdated(properties)
}