Skip to content

Re-render list when numColumns changes #922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

YoussefHenna
Copy link
Collaborator

  • When numColumns changes dynamically on a FlatList we get an error Changing numColumns on the fly is not supported.... To overcome this we can have numColumns as the key of the flatlist and that would trigger it to re-render whenever it changes.
  • Had to make a couple of changes throughout the code to ensure everything uses our own implementation of flatlist that has this change.

Copy link

linear bot commented Aug 8, 2024

Copy link

github-actions bot commented Aug 8, 2024

Published version: @draftbit/[email protected]

@YoussefHenna YoussefHenna merged commit 0f8630b into master Aug 8, 2024
3 checks passed
@YoussefHenna YoussefHenna deleted the youssef/p-5267-flatlist-numcolumns-change-causes-error branch August 8, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant