Commit 95ff517
committed
fix: Respect Sortable.Flex alignItems before items are measured
Sortable.Flex put `alignSelf: 'flex-start'` on every item to stop them
stretching (stretched items would be measured at the wrong size, which
breaks the absolute layout). But `alignSelf` overrides the container's
`alignItems`, so a user-provided `alignItems` (e.g. 'center') was ignored
until the component switched to its absolute layout after measuring,
causing a visible jump with differently-sized items.
Prevent stretching on the container instead: fall back to `alignItems:
'flex-start'` only when no specific `alignItems` is set (or it's
'stretch'), and drop the per-item `alignSelf` override. The provided
`alignItems` now applies from the first render.1 parent 92fe9da commit 95ff517
1 file changed
Lines changed: 5 additions & 10 deletions
Lines changed: 5 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
224 | 223 | | |
225 | 224 | | |
226 | 225 | | |
227 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
228 | 231 | | |
229 | 232 | | |
230 | 233 | | |
| |||
235 | 238 | | |
236 | 239 | | |
237 | 240 | | |
238 | | - | |
239 | 241 | | |
240 | 242 | | |
241 | 243 | | |
242 | 244 | | |
243 | 245 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | 246 | | |
0 commit comments