TanStack / virtual

🤖 Headless UI for Virtualizing Large Element Lists in JS/TS, React, Solid, Vue and Svelte
https://tanstack.com/virtual
MIT License
5.25k stars 271 forks source link

my issues with useVirtualizer with tanstack/react-table to sticky <thead> #591

Open baonv-acbs-com-vn opened 9 months ago

baonv-acbs-com-vn commented 9 months ago

Describe the bug

Describe the bug: iam using useVirtualizer with tanstack/react-table to sticky , but iam scrolling to index 90 sticky not work

<thead style={{ position: "sticky", zIndex: 999, top: 0, margin: 0 }}>

Demo live: https://codesandbox.io/p/sandbox/keen-moser-k3g48j?embed=1&file=%2Fsrc%2Fmain.tsx%3A7%2C14

Your minimal, reproducible example

https://codesandbox.io/p/sandbox/keen-moser-k3g48j?embed=1&file=%2Fsrc%2Fmain.tsx%3A7%2C14

Steps to reproduce

step -> scrolling to index 90 sticky not work

Expected behavior

Expected behavior : when scrolling sticky work

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

OS: Macos Chorme: 116.0.5845.187 (Official Build) (arm64)

tanstack-virtual version

"@tanstack/react-virtual": "3.0.0-beta.60",

TypeScript version

No response

Additional context

"@tanstack/react-table": "^8.7.9", "@tanstack/react-virtual": "3.0.0-beta.60",

Terms & Code of Conduct

evayde commented 9 months ago

Probably duplicate of https://github.com/TanStack/virtual/issues/585