#4929·table

Infinite loop caused by combining virtual scroll and grouping

Author: art0rzCreated Jun 23, 2023Updated Jan 9, 2026

Describe the bug

I'm trying to combine virtual scrolling and row grouping, but it is causing an infinite loop.

Here is an example. Uncomment line 75 in main.tsx and you will see endless console messages and the browser tab will freeze.

Is there another way I should be combining these two features, or is this a bug? I couldn't find an example online that combines these two features.

Your minimal, reproducible example

https://codesandbox.io/p/sandbox/elastic-mendeleev-3nqqhg?embed=1&file=%2Fsrc%2Fmain.tsx%3A75%2C32

Steps to reproduce

  1. Open https://codesandbox.io/p/sandbox/elastic-mendeleev-3nqqhg?embed=1&file=%2Fsrc%2Fmain.tsx%3A75%2C32
  2. Uncomment line 75

Expected behavior

Infinite loop does not occur

How often does this bug happen?

Every time

Screenshots or Videos

https://github.com/TanStack/table/assets/358661/865d1a1d-e995-4c94-a937-8419ca8b293e

Platform

Chrome, Arch Linux x64

react-table version

8.9.2

TypeScript version

No response

Additional context

react-virtual v2.10.4

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.