react-custom-scrollbars-2 icon indicating copy to clipboard operation
react-custom-scrollbars-2 copied to clipboard

Add scrollBehavior to various scrollto functions

Open fourjr opened this issue 3 years ago • 3 comments

Adds a scrollBehavior parameter to all scrollToX functions. The parameter accepts 3 values (auto, instant, smooth) (MDN Docs).

This resolves #20 by setting scrollBehavior to smooth.

fourjr avatar Dec 14 '21 05:12 fourjr

@RobPethick any chance to get this PR merged soon?

fourjr avatar Jul 19 '22 12:07 fourjr

@RobPethick ☝️

scoelliCollectAI avatar Jul 05 '23 09:07 scoelliCollectAI

While waiting this PR is merged You guys can use like this

scrollBarRef.current.view.scroll({
  left:30,
  behavior: 'smooth',
});
    
scrollBarRef.current.view.scroll({
  top:30,
  behavior: 'smooth',
});

megatron-hoa-tran avatar Sep 21 '23 13:09 megatron-hoa-tran