Skip to content

refactor: implement unified ResizeObserver in VirtualList - #688

Merged
nathanschmid08 merged 1 commit into
Avenx-JS:mainfrom
Zyam-1:fix/virtual-list-resize
Jul 29, 2026
Merged

refactor: implement unified ResizeObserver in VirtualList #688
nathanschmid08 merged 1 commit into
Avenx-JS:mainfrom
Zyam-1:fix/virtual-list-resize

Conversation

@Zyam-1

@Zyam-1 Zyam-1 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Fixes #640

Summary

This change updates VirtualList to recalculate visible rows when the viewport size changes.

Details

  • Added a ResizeObserver to monitor size changes on the viewport container.
  • Scheduled layout recalculations with requestAnimationFrame to prevent layout loops.
  • Updated onUnmount() to cleanly disconnect the ResizeObserver and stop pending animation frames.
  • Added unit tests to verify viewport size updates and observer cleanup on unmount.

…iewport and item size changes with animation frame throttling
@nathanschmid08

Copy link
Copy Markdown
Member

Hi @Zyam-1 , Thanks for the PR. I just finished reviewing it and everything checks out. I really appreciate it.

@nathanschmid08
nathanschmid08 merged commit f4dae30 into Avenx-JS:main Jul 29, 2026
1 of 2 checks passed
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.

Good First Issue: Make VirtualList Responsive to Viewport Container Resizing

2 participants