[bugfix] Lazy components empty content handling - #26
Closed
girouxc wants to merge 1 commit into
Closed
Conversation
Contributor
Author
|
Actually, this causes another issue. I will fix it and update the changes here |
chiefcll
added a commit
that referenced
this pull request
Jul 11, 2026
…on (#42) * fix(primitives): import withScrolling directly in VirtualGrid VirtualGrid calls withScrolling(false) at module init through the package barrel, but index.ts re-exports withScrolling after VirtualGrid, so when the barrel is the import entry the binding is still uninitialized and the call throws. Import the module directly instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(lazy): base edge proximity on rendered children, termination on offset Items that render empty insert no child node, so offset() overstates the rendered edge and navigation stops mounting new items (#26). Use container.children.length for the proximity check (child units, matching container.selected) while keeping termination on offset() >= maxOffset (data units) — a diverged child count must neither stop mounting early (multi-node item templates inflate it) nor keep the delay-timer path running forever at the end of the list (empty items deflate it). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
Fixed in other PR |
This file contains hidden or 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
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.
This small change makes it easier to manage the case where there are empty items in the LazyColumn or LazyRow.
When a child is removed from the rendering tree, it messes up with the indexing, resulting in cases where navigating down will not load new children.
This MR fixes it by making the decision to increase the offset consider the actual number of children rendered.
Thanks !