Skip to content
This repository was archived by the owner on Dec 24, 2017. It is now read-only.

correct onPageChange index #12

Merged
merged 1 commit into from
Jul 19, 2016
Merged

correct onPageChange index #12

merged 1 commit into from
Jul 19, 2016

Conversation

antonzy
Copy link

@antonzy antonzy commented May 31, 2016

incorrect page index was passed to the onPageChange handler

@LzxHahaha
Copy link

LzxHahaha commented Jun 14, 2016

I think Swiper.android.js should be like this

if (page != lastPage){
  page = this.props.loop ? page - 1 : page;
  this.setState({
    index: page,
  });
  this.props.onPageChanged && this.props.onPageChanged(page);
}

@sunnylqm
Copy link
Owner

@tdzl2003

@sunnylqm sunnylqm merged commit fd492cf into sunnylqm:master Jul 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants