Skip to content

[bugfix] Lazy components empty content handling - #26

Closed
girouxc wants to merge 1 commit into
solid-tv:mainfrom
girouxc:bugfix/lazy-navigation-when-displaying-empty-content
Closed

[bugfix] Lazy components empty content handling#26
girouxc wants to merge 1 commit into
solid-tv:mainfrom
girouxc:bugfix/lazy-navigation-when-displaying-empty-content

Conversation

@girouxc

@girouxc girouxc commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

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 !

@girouxc

girouxc commented Jun 10, 2026

Copy link
Copy Markdown
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>
@chiefcll

Copy link
Copy Markdown
Contributor

Fixed in other PR

@chiefcll chiefcll closed this Jul 11, 2026
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.

2 participants