GroupedVirtuoso is crashing when trying to rerender component
See original GitHub issueWe have component, which uses GroupedVirtuoso. Some state of our component is changed, which leads to call of render() function. As a result we have exception in GroupedVirtuoso:
Requested offset outside of the known ones, index: 0
I am 110% sure, that data, which is passed to GroupedVirtuoso component is correct.
In fact, i was able to reproduce issue with an example from Virtuoso official page.
I’m not good in web, so sorry in advance, why i did not provide a working example.
- Go https://virtuoso.dev/grouped-numbers/;
- Click on “Edit in StackBlitz” button;
- Editor should be opened;
- Before
return()(15th line) add this:console.log("wassup"); - And you’ll get an error on right browser screen:
Error in /turbo_modules/react-virtuoso@0.14.0/dist/react-virtuoso.cjs.development.js (1321:13)
Requested offset outside of the known ones, index: 0
- Click on “reload” button on right browser screen, and it will reload without issues;
- Modify anything in code (for example text, which is printed in console), and you’ll get an error again;
So, thing is, that we are getting such exception every time, when state of the component is modified, even if data, which is passed to GroupedVirtuoso was not changed.
May be there are some workaround for this issue? Using simple VirtuosoList is not an option: we need those sticky headers.
Thanks.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (4 by maintainers)

Top Related StackOverflow Question
Thanks, I will repro the problem and release a fix - it should not be something to fix on your side.
It seems to be fine now. Amazing!