In the case of iPhone, touch is not available when using Flatlist items.
bigstar8181 opened this issue · 0 comments
bigstar8181 commented
Which OS ?
MacOS 12.4
Version
react-native-swiper v1.6.0
react-native v0.64.4
Actual behaviour
In the case of iPhone, touch is not available when using Flatlist items.
How to reproduce it>
here is the code:
p.s. Whenever the is placed, it will still happen
<FlatList
ref={ref => {
this._flHomeContent = ref;
}}
style={{flex: 1}}
showsVerticalScrollIndicator={false}
data={this.state.arr_list}
numColumns={1}
onViewableItemsChanged={this.onViewableItemsChanged}
viewabilityConfig={{
waitForInteraction: false,
itemVisiblePercentThreshold: 150
}}
renderItem={({ item, index }) => {
return (
<HomeFeedItem
... ... ...
/>
export default class HomeFeedItem extends React.Component {
... ...
render() {
<TouchableWithoutFeedback onPress={() => {
if(onDetail)
onDetail();
}}>
<VerticalLayout style={{width: '100%'}}>
... ...
<View style={styles.swiper_content}>
<Swiper
showButtons={false}
horizontal={true}
autoplay={false}
style={{height: '100%'}}
showsPagination={false}
loop={false}
onIndexChanged={(index) => {
this.setState({swiper_active_index: index});
}}
>
{
item.arr_detail_img.map((it, idx) => {
return (
<TouchableWithoutFeedback onPress={() => {
if(it.type == 0 && onImgZoomView) {
onImgZoomView(it.thumb_img_url);
}
}}>
... ... ..
}
onPress() of not working