You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scrollToIndex throws an error if the list of items in a drop-down is emptied after an item has been selected. From the looks of things, the measurements are being reset to 0 when calculating the location to jump to, which results in an empty array being used to find the index.
Scroll to the bottom to trigger further option loading;
Select one of the lazy-loaded options;
Press the reset button and observe the console;
Expected behavior
I would expect no error to appear in the console.
How often does this bug happen?
Every time
Screenshots or Videos
Screen.Recording.2024-11-13.at.10.28.52.mov
Platform
Firefox 132.0.1 on macOS 14.6.1 (Sonoma), but happens consistently regardless of hardware/software
tanstack-virtual version
v3.10.1
TypeScript version
No response
Additional context
No response
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.
The text was updated successfully, but these errors were encountered:
Describe the bug
scrollToIndex
throws an error if the list of items in a drop-down is emptied after an item has been selected. From the looks of things, the measurements are being reset to 0 when calculating the location to jump to, which results in an empty array being used to find the index.Your minimal, reproducible example
https://carbon.sage.com/?path=/story/select--with-infinite-scroll
Steps to reproduce
Expected behavior
I would expect no error to appear in the console.
How often does this bug happen?
Every time
Screenshots or Videos
Screen.Recording.2024-11-13.at.10.28.52.mov
Platform
Firefox 132.0.1 on macOS 14.6.1 (Sonoma), but happens consistently regardless of hardware/software
tanstack-virtual version
v3.10.1
TypeScript version
No response
Additional context
No response
Terms & Code of Conduct
The text was updated successfully, but these errors were encountered: