-
-
Notifications
You must be signed in to change notification settings - Fork 302
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
[BUG] Grid - "endReached" doesn't get called #924
Comments
Duplicate of #919 |
Maybe I'm missing something and am completely wrong, but I don't think this is a duplicate of the mentioned ticket. For the 1st case: If the event should never get fired then it looks like the List and Grid behave differently. For the 2nd case: I've updated the code sandbox and added an example where just increasing the height by 25px will cause the event to not get fired anymore. |
The list in your example is "broken" by the styling you apply - see how the items reside next to each other. See the sandbox from 919. At any case - you should not design your logic around passing small amount of items and expecting the component to "pull" additional ones with To clarify further on your variations: end reached gets called when the last item is rendered. Overscan setting can cause this to happen with the initial render. |
My bad, I fixed the list, still the same behaviour (without overscan applied).
I understand that, but due to the List behavior I did expect it to atleast get called once.
Okay so that is where my misunderstanding is coming from. I thought it gets called when the end (of the component) is reached. |
Describe the bug
There are cases where "endReached" never gets called when using Grid.
The following cases are the ones I noticed:
Reproduction
The following codesandbox is a fork of the "Grid - Responsive Columns" example of the documentation with slight changes to cause the bug
https://codesandbox.io/s/falling-darkness-gcgnp7?file=/App.js
Expected behavior
(use-case: infinite scrolling)
Desktop (please complete the following information):
Same codesandbox has no issues for the 2nd case on iPhone 13 Pro - Chrome (Versoin 114.0.5735.99)
The text was updated successfully, but these errors were encountered: