SideSwipe not working inside ScrollView
AlexisLeon opened this issue · 4 comments
AlexisLeon commented
Following your example:
import { View, Dimensions, ScrollView } from 'react-native';
export default class SweetCarousel extends Component {
state = {
currentIndex: 0,
};
render = () => {
// center items on screen
const { width } = Dimensions.get('window');
const contentOffset = (width - Card.WIDTH) / 2;
return (
<ScrollView>
<SideSwipe
index={this.state.currentIndex}
itemWidth={Card.WIDTH}
style={{ width }}
data={data}
contentOffset={contentOffset}
onIndexChange={index =>
this.setState(() => ({ currentIndex: index }))
}
renderItem={({ itemIndex, currentIndex, item, animatedValue }) => (...)}
/>
...
</ScrollView>
);
};
}
kkemple commented
hey! thanks for reporting this! looking into it now
kkemple commented
kkemple commented
going to close this since no response
AlexisLeon commented
Fixed in 1.2.1. Thanks @kkemple