You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In componentWillMount it is possible to add those extra tests
if (relativeGestureDistance < -0.25 || (relativeGestureDistance < 0 && vx <= -0.25)) {
if (this.state.index < this.props.children.length - 1) { // make sure it is not the last page before incrementing
newIndex += 1;
}
} else if (relativeGestureDistance > 0.25 || (relativeGestureDistance > 0 && vx >= 0.25)) {
if (this.state.index > 0) { // make sure it is not the first page before decrementing
newIndex -= 1;
}
}
Hi,
It would be nice that we could prevent the user to swipe right on the last page and left on the first page.
Thanks.
The text was updated successfully, but these errors were encountered: