React-native-snap-carousel: [Feature request] flag for whether to trigger callback for snapToItem

Created on 12 Apr 2018  路  1Comment  路  Source: meliorence/react-native-snap-carousel

Would like to add flag so that onSnapToItem can be disabled when the carousel is manually snapped via the method snapToItem.
e.g. carousel.snapToItem(4, {:animated true :callback false}) would _not_ trigger the onSnapToItem callback.

Reason being that we want to trigger the callback when the item is snapped via the user swiping, but we don't want to trigger the callback when we programmatically snap to the item.

Most helpful comment

@jlo1 Wish granted in version 3.7.0 ;-)

snapToItem() now accepts an optional third parameter for this use case.

>All comments

@jlo1 Wish granted in version 3.7.0 ;-)

snapToItem() now accepts an optional third parameter for this use case.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NikitaNeganov picture NikitaNeganov  路  3Comments

amyogiji picture amyogiji  路  5Comments

akyker20 picture akyker20  路  3Comments

duongkhoilinh picture duongkhoilinh  路  4Comments

wkwyatt picture wkwyatt  路  4Comments