0

I am using react-scroll in react and i am trying to scroll the container div overflow-y after doing an action click in a button, but the function scrolls the body overflow not the container div. How can i do it?

The body has overflow: hidden, and the container div has overflow-y: scroll

PORMAZION
  • 11
  • 2

1 Answers1

0

Please check this link : https://medium.com/how-to-react/scroll-to-an-element-on-click-in-react-js-8424e478bb9

if you face any problem following the doc then open the code sandbox and play with the code and see the demo.

MDMH
  • 83
  • 1
  • 8
  • My problem is not with how the library works, i understand it. My problem is scroll in a div and not in a body – PORMAZION May 08 '21 at 16:10