Skip to content

Fix 'index' prop on iOS#520

Closed
Exilz wants to merge 1 commit into
leecade:masterfrom
Exilz:patch-1
Closed

Fix 'index' prop on iOS#520
Exilz wants to merge 1 commit into
leecade:masterfrom
Exilz:patch-1

Conversation

@Exilz

@Exilz Exilz commented Aug 14, 2017

Copy link
Copy Markdown
Contributor

Is it a bugfix ?

Yes, commit ff12771 breaks the index prop on iOS which means you can't set the first slide anymore.

Is it a new feature ?

Nope

Describe what you've done:

The condition on line 258 is always false, this.state.offset wasn't set on the first render.

How to test it ?

Render the swiper with an index set to an int, you can see it starts properly on this value.

Commit ff12771 breaks the `index` prop on `iOS` which means you can't set the first slide anymore.
Since the condition on line `258` is always `false`, `this.state.offset` wasn't set on the first render.
@arribbar

Copy link
Copy Markdown
Collaborator

Thanks for this PR.
But it seems it is duplicated with #516

@arribbar arribbar closed this Aug 14, 2017
@Exilz

Exilz commented Aug 14, 2017

Copy link
Copy Markdown
Contributor Author

Nevermind, I missed it 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants