What does scrollMargin do ?
I was going through
react
, dynamic
example for beta
version. In that I came across this code
Here I could not understand why we are passing scrollMargin
to useWindowVirtualizer
2 Replies
thirsty-copper•3y ago
Hi, as in some cases the list doesn't start from top of the page (imho in most cases), basic having some content before, as in this example
By setting
scrollMargin: 50
it will be used with scroll offset to correct calculate from where list start when scrollingrare-sapphireOP•3y ago
Got it, in my demo I did not have any content above. Therefore I could not figure out use case for it