Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scrollBehavior to various scrollto functions #21

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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

megatron-hoa-tran 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