Open IIslam opened 3 years ago
src/index.js 文件 line303 修改为 const offset = (this.internals.offset = {x:0, y:0})
This is the workaround that have worked for me: width is the item width: Dimensions.get('screen').width <Swiper showsButtons={false} showsPagination={false} height={150} index={activeItemIndex} onMomentumScrollEnd={e => setActiveItemIndex(e.nativeEvent.contentOffset.x / width)} containerStyle={{ position: 'absolute', zIndex: 1, left: 0, right: 0, bottom: BOTTOM_TAB_BAR_HEIGHT, }}
Here what is setActiveItemIndex ?
Which OS ?
Android 11
Version
Which versions are you using:
Expected behaviour
onIndexChanged should fire with the correct Index index in renderPagination should render with correct index
Actual behaviour
onIndexChanged is not fired at all. renderPagination is always fired with index equals Zero
How to reproduce it>
This is the component Used