Commit 0fb8f9f
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 0fb8f9f
3 files changed
Lines changed: 67 additions & 13 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 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
112 | 149 | | |
113 | 150 | | |
114 | 151 | | |
115 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
116 | 159 | | |
117 | 160 | | |
118 | 161 | | |
| |||
155 | 198 | | |
156 | 199 | | |
157 | 200 | | |
158 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
159 | 214 | | |
160 | 215 | | |
161 | 216 | | |
162 | | - | |
163 | | - | |
| 217 | + | |
| 218 | + | |
164 | 219 | | |
165 | 220 | | |
166 | 221 | | |
| |||
0 commit comments