Commit bb93473
fix(website): stop date range strictness checkbox stuck on strict when no date entered (#6485)
Fixes #6483
## What was happening
When you toggled the strictness checkbox in a `DateRangeField` (e.g. the
Collection date filter) without having entered any dates, was stuck on.
This matches the user reports in #6483:
- The checkbox "actually seems stuck enabled"
## Fix
In the read-in effect, skip the `setStrictMode` call when none of the
four bound fields are defined — there is no signal to derive from in
that case, so we preserve the user's manual selection. When at least one
field is defined the existing `isStrictMode` logic still runs and stays
in charge.
The write-out effect is unchanged. External (URL-driven) changes still
flow in correctly because they always come with at least one bound
defined.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
🚀 Preview: https://fix-date-range-strictness.loculus.org
Co-authored-by: theosanderson-agent <theo@theo.io>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 3947ca8 commit bb93473
2 files changed
Lines changed: 43 additions & 8 deletions
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
161 | 193 | | |
162 | 194 | | |
163 | 195 | | |
| |||
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
| |||
0 commit comments