Open z-lionel opened 1 year ago
We also faced this issue some time ago and we solved it through below method.
const onRowsRendered = (data) => {
const { startIndex, stopIndex } = data;
if (
scrollIndex !== -1 &&
(scrollIndex >= startIndex || scrollIndex <= stopIndex)
) {
setScrollIndex(-1);
}
}
When the list is first loaded, i want to scroll to the bottom it can work when i get the data, and set the value at scrollToIndex={data.length - 1} when i scroll to top it not problem, but i scroll down, it just jumping to the bottom
it can fixed by i reset scrollToIndex={-1}, but i have no way to know when the list first load and scroll to the bottom already