TanStackT
TanStack2y ago
1 reply
full-green

Dynamic Width + Manual Scrolling Re-mounts

Hello. I want to achieve the same effect as in Chrome DevTools > Performance tab. This means that when you hold Command (or Ctrl) and scroll, it should zoom into a certain point.

I use the virtualizer.measure() API for this so the library can react to the width change.

For some reason, it re-mounts elements that should be visible if I scroll quickly. The further to the right I scroll, the more noticeable the issue becomes. The first render after mounting is delayed, making the issue more apparent.

Am I on the right track, or is there a better way to achieve this?

https://codesandbox.io/p/sandbox/zoom-and-scroll-example-4443vy
Was this page helpful?