0

I have a right arrow and a left arrow which scrolls the carousel via scrollBy. The right scroll seems to work fine in all situations but the left scroll does not work in the full sized window(although it works in any other window sizes weirdly).

I am doing the scrolls via ref generated by useRef in Next JS and applying the scrollBy on it(although I tested it out in the console as well and that does not work either when the window is full sized). The left scroll code :

onClick={() => containerRef.current.scrollBy(-200, 0)}
Aritra Roy
  • 14
  • 1

0 Answers0