react-virtualized icon indicating copy to clipboard operation
react-virtualized copied to clipboard

Set the property to set the smoothness of the scroll

Open wilderedin5 opened this issue 4 years ago • 2 comments

Hi, I have several scroll lists and they are linked. I really miss the property for setting the smoothness of the scroll movement for better visualization.

Can I somehow get to the ref of the scroll container and use scrollTo with the smooth option?

Are you planning to add this property? Can you tell me how to set the smoothness?

P.S: I may have missed something in the documentation. Thanks for your work :)

wilderedin5 avatar Nov 11 '20 18:11 wilderedin5

I'm also wondering about how to do this!

coopslarhette avatar Aug 25 '21 20:08 coopslarhette

Bit late to the party, but hopefully this helps someone...

const offset = listRef.current.getOffsetForRow({
      alignment: 'start',
      index: ???,
    });

listRef.current.Grid._scrollingContainer.scrollTo({
      top: offset,
      left: 0,
      behavior: 'smooth',
    });

danvoyce avatar Sep 07 '22 12:09 danvoyce