Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Snapping to the first item not working #696

Merged
merged 1 commit into from
May 26, 2020
Merged

Fix: Snapping to the first item not working #696

merged 1 commit into from
May 26, 2020

Conversation

focux
Copy link

@focux focux commented May 19, 2020

Platforms affected

Android, iOS

What does this PR do?

When you try to snap to the first item, using the snapToItem function, it doesn't work. It works for all but the first element. e.g.

carouselRef.current?.snapToItem(0) // this doesn't works
carouselRef.current?.snapToItem(1) // this works

What testing has been done on this change?

I tested the fix in my app and it works as expected, anyways, It's just a minor change.

Tested features checklist

@focux focux changed the base branch from master to 4.0.0-beta.x May 19, 2020 00:46
@bfaulk96
Copy link

bfaulk96 commented May 19, 2020

@bd-arc Any chance you could take a look at this at some point? Pretty small change to fix a pretty bad bug on 4.0.0-beta.2

@jacquesdev
Copy link

@bfaulk96 - in your description above, you mention

carouselRef.current?.snapToItem(0) // this doesn't works
carouselRef.current?.snapToItem(0) // this works

Is that a typo, looks like the same line to me?

@focux
Copy link
Author

focux commented May 21, 2020

@jacquesdev lol ya, just fixed it. Thank you.

@bd-arc bd-arc merged commit 45f5be0 into meliorence:4.0.0-beta.x May 26, 2020
@bd-arc
Copy link
Contributor

bd-arc commented May 26, 2020

@focux Thanks for that! So easy to overlook...

@bd-arc bd-arc mentioned this pull request May 26, 2020
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.

4 participants