-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Ensure limit is reset when initialCount is disabled. #5640
Merged
kevinpschaaf
merged 9 commits into
legacy-undefined-noBatch
from
legacy-undefined-noBatch-5631-2
Mar 5, 2020
Merged
Ensure limit is reset when initialCount is disabled. #5640
kevinpschaaf
merged 9 commits into
legacy-undefined-noBatch
from
legacy-undefined-noBatch-5631-2
Mar 5, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note that any falsey value for initialCount (including `0`) is interpreted as "chunking disabled". This is consistent with 1.x logic, and follows from the logic of "starting chunking by rendering zero items" doesn't really make sense.
…a test for that. Also: * Ensure `__itemsArrayChanged` is cleared after every render. * Enqueue `__continueChunkingAfterRaf` before notifying renderedItemCount for safety
Safari 9 is now very old, and has micro task ordering bugs issues that make testing flaky.
sorvell
suggested changes
Mar 4, 2020
This centralizes the calculation of limit based on changes to other state variables.
sorvell
approved these changes
Mar 4, 2020
Also, use instances length instead of renderedItemCount since it will be undefined on first render.
kevinpschaaf
force-pushed
the
legacy-undefined-noBatch-5631-2
branch
from
March 5, 2020 06:50
15b0247
to
ddb37df
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves a corner-case issue with the previous fix in #5632, where rendering an empty list (
items.length===0
), setting theinitialCount
to0
, and then attempting to render a list withitems.length > 0
could cause the list to be stuck in an unrendered state.Note that any falsey value for
initialCount
(including0
) is interpreted as "chunking disabled". This is consistent with 1.x logic, and follows from the logic of "starting chunking by rendering zero items" doesn't really make sense.Also took the opportunity while adding a new test to refactor the chunking tests to use async/await for better readability.
Reference Issue
Fixes #5631