Skip to content

fix: Sortable.Layer ignoring view props - #642

Draft
MatiPl01 wants to merge 2 commits into
mainfrom
fix/layer-view-props
Draft

MatiPl01 wants to merge 2 commits into
mainfrom
fix/layer-view-props

Conversation

@MatiPl01

Copy link
Copy Markdown
Owner

Description

Sortable.Layer is typed and documented as accepting view props, but it only rendered its children inside a plain animated view. A style was ignored, and with the CellRendererComponent={Sortable.Layer} pattern the props FlatList passes to its cells (style, onLayout) were dropped, so the list never received the layout of its cells.

The view props are now passed to the rendered view.

Testing

New jest test (fails on main). The FlatList tab of the Auto Scroll example, which uses CellRendererComponent={Sortable.Layer}, renders and sorts correctly on the iOS simulator (Fabric).

Evidence
Test on main before-test-on-main.txt
Test with the fix after-test-with-fix.txt

The component is typed and documented as accepting view props, but only rendered its children, so a style or the props FlatList passes to a CellRendererComponent were dropped.
@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
react-native-sortables-docs Ready Ready Preview Nov 26, 2026 1:45pm UTC

@MatiPl01 MatiPl01 self-assigned this Nov 25, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Nov 26, 2026

This branch was successfully deployed

1 active deployment
Preview — 14dd3f16 Deployed Nov 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation fix test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant