Closed alex-nb closed 10 months ago
What are you trying to do here? Reset horizontal scrolling? If so, using the virtuoso API makes no sense, get the element with scrollerRef
and use the DOM API, I think that you can even omit the top value, and just pass the left one.
Yes, I already used this solution, but still it can be bug
I see your point. At the moment, the component methods have guards against scrolling to the same vertical location, and don't take the horizontal one into account.
However, calling getState is fairly expensive operation, so I would not recommend that approach even if it worked.
Describe the bug
scrollTo doesn't work in that case. It still works without top or without assignment in getState
Reproduction Codesandbox
To Reproduce Steps to reproduce the behavior:
Expected behavior Scroll is working
Desktop (please complete the following information):