react-native-swiper icon indicating copy to clipboard operation
react-native-swiper copied to clipboard

ScrollBy method undefined

Open ruben-kasaz opened this issue 6 years ago • 3 comments

Hello! I am trying to use react-native-swiper on my project. I had my own custom buttons. So when I click on a button, it calls the scrollBy function. But it's not working.

This is what I coded :

Capture d’écran 2020-01-02 à 17 19 03

This is the error I get :

80896317_2650806868288379_6172734462464360448_n

How I can solve this ? Thanks.

Which OS ?

Android

Version

Which versions are you using:

  • react-native-swiper v1.5.14
  • react-native v0.59

ruben-kasaz avatar Jan 02 '20 16:01 ruben-kasaz

ref.current.scrollBy

rthomazel avatar Jan 07 '20 20:01 rthomazel

try using this.refs.swiper.scrollBy(n) in your case refs.swiper.scrollBy(n)

gauravsbagul avatar Jan 28 '20 17:01 gauravsbagul

ref.current.scrollBy

This works, the issue can be closed

harshvitra avatar Mar 17 '20 13:03 harshvitra