T
TanStack3y ago
stormy-gold

scrollToindex with behavior:smooth and dynamic size.

I have an issue when using scrollToIndex with behavior: smooth. It's not working on large list data ( wrong position after scrolling). If I removed behavior:smooth, it works well. I use version beta v54 and v30. I found that code: `if (behavior === 'smooth' && this.isDynamicMode()) {... I would like to ask a question or receive support from you. Can I manually control scrollToIndex with smooth and without more jumps if custom this function? If scrollIndex is end of large list => multiple jumps. const scrollToIndex = (index, ...args) => { rowVirtualizer.scrollToIndex(index, ...args); setTimeout(() => { const { start, end } = rangeRef.current; const isVisible = index >= start && index <= end; if (!isVisible) { scrollToIndex(index, ...args); } }, 1000); }; thanks
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?