Skip to content

fix: Respect Sortable.Flex alignItems before items are measured#560

Merged
MatiPl01 merged 1 commit into
mainfrom
fix/flex-align-items
Jun 10, 2026
Merged

fix: Respect Sortable.Flex alignItems before items are measured#560
MatiPl01 merged 1 commit into
mainfrom
fix/flex-align-items

Conversation

@MatiPl01

@MatiPl01 MatiPl01 commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

Fix self alignment default value in flex.

@vercel

vercel Bot commented Jun 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
react-native-sortables-docs Ignored Ignored Preview Jun 7, 2026 6:47pm

@github-actions github-actions Bot added the fix label Jun 7, 2026
@MatiPl01 MatiPl01 force-pushed the fix/flex-align-items branch from df57488 to 95ff517 Compare June 7, 2026 16:54
@MatiPl01 MatiPl01 changed the title fix: Apply Sortable.Flex alignItems before items are measured fix: Respect Sortable.Flex alignItems before items are measured Jun 7, 2026
@MatiPl01 MatiPl01 force-pushed the fix/flex-align-items branch from 95ff517 to 073b7e0 Compare June 7, 2026 18:42
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'` when no `alignItems` is set (the default that would
stretch), and drop the per-item `alignSelf` override. Any provided
`alignItems` now applies from the first render.
@MatiPl01 MatiPl01 force-pushed the fix/flex-align-items branch from 073b7e0 to ae315a4 Compare June 7, 2026 18:46
@MatiPl01 MatiPl01 self-assigned this Jun 10, 2026
@MatiPl01 MatiPl01 merged commit 5c84117 into main Jun 10, 2026
11 checks passed
@MatiPl01 MatiPl01 deleted the fix/flex-align-items branch June 10, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant