Closed tezqa closed 7 years ago
@tezqa this.refs.carousel.goToPage
is an undefined function for me, am I correct in my understanding that this is made accessible to us by the react-native-carousel-control
component, or is there more I have to do here?
@janyk make sure you have the "ref" property like this:
<Carousel ref="carousel"
@tezqa thank you very for reporting it, and the workaround!
Looks like we should add that validation to the goToPage
method (https://github.com/machadogj/react-native-carousel-control/blob/master/index.js#L91).
Let me know if you are up for a PR, or else I'll try to tackle this later on. Thanks!
Hi @tezqa sorry for the huge delay, but this should be fixed in version 1.1.2. Let me know if you get a chance to test in your side. Thanks for reporting it!
To reproduce this issue: Add only one item to the carousel and try to slide to the right: an invisible item is selected.
A quick fix: