diff --git a/components/Swiper.js b/components/Swiper.js index 98e27ce..2a7b99d 100644 --- a/components/Swiper.js +++ b/components/Swiper.js @@ -22,7 +22,7 @@ export default function Swiper({style, data, isStaticPills, initialScrollIndex, if (buttonsCoords[index]?.x !== e.x) buttonsCoords[index] = e.nativeEvent.layout; }; - const onButtonPress = index => () => flatList.current?.scrollToIndex({index}); + const onButtonPress = index => flatList.current?.scrollToIndex({index}); const onFlatListScroll = e => { // update X diff --git a/package.json b/package.json index c281747..837464f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-screens-swiper", - "version": "1.1.10", + "version": "1.1.11", "description": "This lib. provide swiper view functionality with tab navigation on the top.", "main": "index.js", "repository": {