Commit c57319e
Fix initial value clobbered by resting leading tick
updateCentered wrote the centered tick back to the binding on first
layout — before the deferred scrollTo(value) ran — so the strip's resting
leading tick (range.lowerBound) overwrote the incoming value, then the
scroll targeted the clobbered value. A picker created with value 13 would
snap to 1.
Gate write-backs on a new didCenter flag that flips true only after the
initial scrollTo; split the one-time onAppear guard into didAppear.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent eda34de commit c57319e
1 file changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
| |||
148 | 152 | | |
149 | 153 | | |
150 | 154 | | |
151 | | - | |
152 | | - | |
| 155 | + | |
| 156 | + | |
153 | 157 | | |
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
157 | 165 | | |
158 | 166 | | |
159 | 167 | | |
| |||
220 | 228 | | |
221 | 229 | | |
222 | 230 | | |
223 | | - | |
| 231 | + | |
224 | 232 | | |
225 | 233 | | |
226 | 234 | | |
| |||
0 commit comments