Commit df57488
committed
fix: Apply Sortable.Flex alignItems before items are measured
Sortable.Flex forced `alignSelf: 'flex-start'` on every item to prevent
stretching, but that also overrode a user-provided `alignItems` during
the initial (pre-measurement) render phase. With items of different sizes
this made them appear misaligned at first; they only snapped to the
correct alignment after measuring, causing a visible jump.
Only apply the `flex-start` override when `alignItems` is unset or
`stretch` (the cases where items would otherwise stretch). For any other
`alignItems` value, let it apply so items are aligned from the first
render.1 parent 92fe9da commit df57488
1 file changed
Lines changed: 11 additions & 2 deletions
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
239 | 247 | | |
240 | 248 | | |
241 | 249 | | |
242 | 250 | | |
243 | 251 | | |
244 | 252 | | |
245 | 253 | | |
246 | | - | |
| 254 | + | |
| 255 | + | |
247 | 256 | | |
248 | 257 | | |
249 | 258 | | |
| |||
0 commit comments