Skip to content
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

Bugfix(layoutSize) fix item not render after initial data size is empty #781

Conversation

shawnchendev
Copy link
Contributor

@shawnchendev shawnchendev commented May 29, 2024

This PR address two issues

Issue 1

this will fix flash-list issue Shopify/flash-list#784

if layoutSize is provided, items doesn't render if the initial data size is empty.

add new function to componentCompact to allow extended component to had access to the _hasRenderOnce

only assign the state is the component never get render before

Here is the screen capture i had for the Shopify POS that reproduce the issue

BEFORE

before.recyclerlistview.mp4

AFTER

after.recyclerlistview.mp4

Issue 2

after fixing issue 1, when navigate to the list. the content size will increase by the estimatedItemSize

here is the screenshot and video demo on SHOPIFY POS on the issue

image

RPReplay_Final1715890031.mp4

if layoutSize is provided, items doesn't render if the initial data size is empty.

add new function to componentCompact to allow extended component to had access to the _hasRenderOnce

only assign the state is the component never get render before
"file-directives": "1.4.6",
"tslint": "5.11.0",
"typescript": "3.3.1"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update typescript to a more recent version. because i couldnt get the tslint to run

@ananyachandra14 ananyachandra14 merged commit f2bdac4 into Flipkart:master Jun 10, 2024
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.

3 participants