goldenyz / react-perfect-scrollbar

A react wrapper for perfect-scrollbar
MIT License
482 stars 92 forks source link

How do you add "scroll-behavior: smooth;" for cases like scrollTop = 0 ? #75

Closed sdevil7th closed 5 years ago

sdevil7th commented 5 years ago

I have a big component inside the scrolling wrapper and I have an external trigger for scroll to top. But when it's triggered it scrolls to top in an instant. I'd like to use the css property "scroll-behavior: smooth;" here so that the transition is smooth. Please help me on the approach.

sdevil7th commented 5 years ago

It can be added to the container and it'll work for the trigger, but then normal scroll triggered by used is not working!

goldenyz commented 5 years ago

It would be better if ask this questions to https://github.com/mdbootstrap/perfect-scrollbar. Because this component is just a wrapper for that component