Skip to content

Keep render stack in bounds when layouts shrink - #2446

Open
Hashim1999164 wants to merge 1 commit into
Shopify:mainfrom
Hashim1999164:fix/render-stack-layout-shrink
Open

Keep render stack in bounds when layouts shrink#2446
Hashim1999164 wants to merge 1 commit into
Shopify:mainfrom
Hashim1999164:fix/render-stack-layout-shrink

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Aug 16, 2026

Copy link
Copy Markdown

Summary

  • Sync the render stack after modifyChildrenLayout shrinks the layout table so recycled keys cannot point past the last layout
  • Skip ViewHolderCollection entries whose index is past the current data length so getLayout does not throw

Closes #2440

Test plan

  • yarn test src/tests/RecyclerViewManager.test.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ViewHolderCollection render throws "index out of bounds, not enough layouts" when the render stack outlives a layout-table shrink

1 participant