Commit 7a872d1
fix(dashboard): required filters reliably apply default + Apply enables on change
Three small fixes for native filter state desync:
1. utils.ts — remove the selectedCount !== appliedCount early-return in
checkIsApplyDisabled (regression from #37681). It disabled Apply whenever
Selected had an entry Applied lacked — i.e. precisely when a user typed
a value into a filter whose default never made it to Applied. dataEqual
with ignoreUndefined already handles the "no real change" case correctly.
2. reducer.ts updateDataMaskForFilterChanges — only preserve existing
filterState/extraFormData when there's actually a non-empty value.
Previously, modifying a required filter would preserve empty existing
state and wipe the newly defined default.
3. reducer.ts fillNativeFilters — on HYDRATE_DASHBOARD the shallow spread
of the permalink-loaded dataMask wiped filter.defaultDataMask.filterState
when the loaded mask was captured mid-initialization. Now defaults
survive when the loaded mask lacks a real value.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent df8222f commit 7a872d1
3 files changed
Lines changed: 41 additions & 11 deletions
File tree
- superset-frontend/src
- dashboard/components/nativeFilters/FilterBar
- dataMask
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
303 | 306 | | |
304 | 307 | | |
305 | 308 | | |
| |||
322 | 325 | | |
323 | 326 | | |
324 | 327 | | |
325 | | - | |
| 328 | + | |
326 | 329 | | |
327 | 330 | | |
328 | 331 | | |
| |||
Lines changed: 3 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
84 | 80 | | |
85 | 81 | | |
86 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
112 | 129 | | |
113 | 130 | | |
114 | 131 | | |
115 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
116 | 139 | | |
117 | 140 | | |
118 | 141 | | |
| |||
155 | 178 | | |
156 | 179 | | |
157 | 180 | | |
158 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
159 | 189 | | |
160 | 190 | | |
161 | 191 | | |
| 192 | + | |
162 | 193 | | |
163 | 194 | | |
164 | 195 | | |
| |||
0 commit comments