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

correct onPageChange index - #12

Merged
sunnylqm merged 1 commit into
sunnylqm:masterfrom
antonzy:upstream
Jul 19, 2016
Merged

sunnylqm merged 1 commit into
sunnylqm:masterfrom
antonzy:upstream

Conversation

@antonzy

@antonzy antonzy commented May 31, 2016

Copy link
Copy Markdown

incorrect page index was passed to the onPageChange handler

@LzxHahaha

LzxHahaha commented Jun 14, 2016 •

Copy link
Copy Markdown

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
Copy Markdown
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