Skip to content

Conversation

fourjr
Copy link

@fourjr fourjr commented Dec 14, 2021

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
Copy link
Author

fourjr commented Jul 19, 2022

@RobPethick any chance to get this PR merged soon?

@scoelliCollectAI
Copy link

@RobPethick ☝️

@megatron-hoa-tp-frontend
Copy link

megatron-hoa-tp-frontend commented Sep 21, 2023

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',
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Smooth scrolling when calling a "scroll" function
3 participants