react-swipeable-views
react-swipeable-views copied to clipboard
swipe animation is very not smooth when axis is `y`
Current Behavior
ok, here is what i meet:
axis: x is very smooth, and working well.
but when the page show on orientation iPhone,
i change it to 'y'. and then, the swipe looks very bad.
as the following gif shown.

touch any part of slide will cause unexpected swipe. anybody know what was happend?
Steps to Reproduce (for bugs)
my code looks like this:
const Virtualize = virtualize(SwipeableViews);
const slideRenderer = ({ index, key }) => (
<View key={key} style={{ padding: 10, height: '100%' }}>
<Text>{`${index} - ${key}`}</Text>
</View>
);
render() {
const { window } = this.props;
const { width, height } = window;
const horizontal = width < height;
const stylePadding = (
horizontal
? {
paddingLeft: 40,
paddingRight: 40,
}
: {
paddingTop: 40,
paddingBottom: 40,
}
);
return (
<Virtualize
resistance
style={{ flex: 1, ...stylePadding }}
containerStyle={{ height: '100%' }}
slideStyle={{ height: '100%' }}
axis={horizontal ? 'x' : 'y'}
slideRenderer={slideRenderer}
/>
)
}
Your Environment
| Tech | Version |
|---|---|
| "react-swipeable-views": | "^0.13.0", |
| "react-swipeable-views-core": | "^0.13.0", |
| "react-swipeable-views-native": | "^0.13.1", |
| "react-swipeable-views-utils": | "^0.13.0", |
| "react": | "^16.6.0", |
| "react-native-web": | "^0.9.5", |
and the flat ignoreNativeScroll: true cannot fix this .
@oliviertassinari hey sir, could you help me?