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
When having variable row heights by setting rowHeightGetter property and isVerticalScrollExact = true and clicking once on the vertical scrollbar area, the scrollbar thumb isn't jumping exactly where the click happened.
This was a known issues at the time the "isVerticalScrollExact" feature was introduced: in #701
Possible Solution
The cause of this is that the actual row heights are requested when the first scroll event happens. But in order for the scrollbar to work correctly when is clicked, the exact row heights should be computed before scrollbar initial configuration, in order for the ScrollbarComponent.contentSize to be exact.
So the solution is to move the code that computes and stores the actual row heights from scrollTo() to initializeRowHeightsAndOffsets()
Steps to Reproduce (for bugs)
You can reproduce this by simply checking out the DynamicRowHeights example, specifying isVerticalScrollExact={true}, and scrolling exactly once by clicking on the vertical scrollbar area.
The text was updated successfully, but these errors were encountered:
daniela-mateescu
changed the title
Scroll to an exact position when clicking the scrollbatr track doesn't work in case of variable row heights and isVerticalScrollExact = true
Scroll to an exact position when clicking the scrollbar track doesn't work in case of variable row heights and isVerticalScrollExact = true
Dec 20, 2023
When having variable row heights by setting
rowHeightGetter
property andisVerticalScrollExact = true
and clicking once on the vertical scrollbar area, the scrollbar thumb isn't jumping exactly where the click happened.This was a known issues at the time the "isVerticalScrollExact" feature was introduced: in #701
Possible Solution
The cause of this is that the actual row heights are requested when the first scroll event happens. But in order for the scrollbar to work correctly when is clicked, the exact row heights should be computed before scrollbar initial configuration, in order for the
ScrollbarComponent.contentSize
to be exact.So the solution is to move the code that computes and stores the actual row heights from
scrollTo()
toinitializeRowHeightsAndOffsets()
Steps to Reproduce (for bugs)
You can reproduce this by simply checking out the
DynamicRowHeights
example, specifyingisVerticalScrollExact={true}
, and scrolling exactly once by clicking on the vertical scrollbar area.The text was updated successfully, but these errors were encountered: