Skip to content

Commit 9abb1a8

Browse files
committed
get scrollLeft value from the right parent
1 parent de46788 commit 9abb1a8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/ScrollCardsNavigator.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ function ScrollCardsNavigator() {
4848
return
4949
}
5050
trackPageScroll(direction)
51-
const { offsetWidth, scrollLeft } = scrollBarContainer.current.children[0]
51+
const { scrollLeft } = scrollBarContainer.current
52+
const { offsetWidth } = scrollBarContainer.current.children[0]
5253
let extraPadding = 32 // Should be calculated dynamically
5354

5455
const position =

0 commit comments

Comments
 (0)