react-native-sortables icon indicating copy to clipboard operation
react-native-sortables copied to clipboard

fix: Fall back to layout position when item position is unset

Open MatiPl01 opened this issue 5 months ago • 1 comments

Fixes grid/flex items not appearing until the first scroll on Reanimated 4.4 (#552).

When absolute layout becomes active, an item's animated position may not be propagated yet, so it would render with HIDDEN_STYLE and stay hidden until a scroll re-ran the layout. This falls back to the item's layoutPosition (from itemPositions) while position is still null, so items render at their correct slots immediately. position stays primary (drag/reorder animations unaffected), and HIDDEN_STYLE is kept only as the both-null fallback.

Closes #552

MatiPl01 avatar Jun 07 '26 12:06 MatiPl01

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

Project Deployment Actions Updated (UTC)
react-native-sortables-docs Ready Ready Preview, Comment Jun 10, 2026 2:14pm

vercel[bot] avatar Jun 07 '26 12:06 vercel[bot]

Closing without merging - the layout-position fallback fix is no longer necessary as reanimated 4.5.0 fixed the issue.

MatiPl01 avatar Jun 24 '26 22:06 MatiPl01

Closing without merging — the layout-position fallback fix is no longer necessary.

Hey @MatiPl01, I just applied this patch yesterday. What's the reason this is no longer necessary? Is it because of changes made in Reanimated 4.5?

timgcarlson avatar Jun 25 '26 16:06 timgcarlson

Closing without merging — the layout-position fallback fix is no longer necessary.

Hey @MatiPl01, I just applied this patch yesterday. What's the reason this is no longer necessary? Is it because of changes made in Reanimated 4.5?

Yes, exactly. We will backport it to 4.4.2 soon.

MatiPl01 avatar Jun 25 '26 16:06 MatiPl01