Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In the case of iPhone, touch is not available when using Flatlist items. #1360

Open
bigstar8181 opened this issue Jan 25, 2023 · 0 comments
Open

Comments

@bigstar8181
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant