fix(chart API): apply dashboard filters by live scope, not stale chartsInScope (#41214)

This commit is contained in:
Vitor Avila
2026-06-19 15:22:54 -03:00
committed by GitHub
parent 9e130e5927
commit 334b13c3d9
3 changed files with 24 additions and 22 deletions
@@ -183,6 +183,7 @@ class TestBuildAppliedDashboardFilters:
"type": "NATIVE_FILTER",
"filterType": "filter_select",
"chartsInScope": [1],
"scope": {"rootPath": ["ROOT_ID"], "excluded": []},
"targets": [{"column": {"name": "country"}, "datasetId": 7}],
"defaultDataMask": {
"filterState": {"value": ["US"]},
@@ -226,7 +227,8 @@ class TestBuildAppliedDashboardFilters:
"name": "Region",
"type": "NATIVE_FILTER",
"filterType": "filter_select",
"chartsInScope": [2, 3], # chart 1 excluded
"chartsInScope": [2, 3],
"scope": {"rootPath": ["ROOT_ID"], "excluded": [1]}, # chart 1 excluded
"targets": [{"column": {"name": "region"}, "datasetId": 7}],
"defaultDataMask": {
"filterState": {"value": ["NA"]},
@@ -257,6 +259,7 @@ class TestBuildAppliedDashboardFilters:
"type": "NATIVE_FILTER",
"filterType": "filter_select",
"chartsInScope": [1],
"scope": {"rootPath": ["ROOT_ID"], "excluded": []},
"targets": [{"column": {"name": "region"}, "datasetId": 7}],
"controlValues": {"defaultToFirstItem": True},
"defaultDataMask": {},