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

[iOS] Click on another Tab, but onPress does not response when FlatList during scrolling #857

Closed
malonguwa opened this issue Mar 20, 2018 · 4 comments

Comments

@malonguwa
Copy link

malonguwa commented Mar 20, 2018

I use scrollableTabView 0.8.0,

 <ScrollableTabView
                    renderTabBar={() => <ScrollableTabBar/>}
                    tabBarUnderlineStyle={{backgroundColor:'#FB7400',height:2}}
                    // tabBarTextStyle={{marginBottom:0,paddingBottom:0,marginTop:0}}
                    tabBarActiveTextColor={'#FB7400'}
                    tabBarBackgroundColor={'#EEEEEE'}
                    scrollWithoutAnimation={true}
                    initialPage={0}
                    page={0}
                    locked={false}
                >
                    <ScreenOne tabLabel="ScreenOne"/> // FlatList
                    <ScreenTwo tabLabel="ScreenTwo"/> // FlatList
                    <ScreenThree  tabLabel="ScreenThree"/> // FlatList
                    <ScreenFour tabLabel="ScreenFour"/> // FlatList
            </ScrollableTabView>

Tab's onPress does not response when I click it during the FlatList scrolling, I think this should be another classic issue between onPress event not working during FlatList scrolling....... Is there any walk around for this? so far only pressIn working for me... but it will make scrollableTabView can not be scrolled anymore... since pressIn will trigger at the moment when we touch the component and it will not trigger pan/drag gesture any more.....

Any help would be much appreciate!!!!

@malonguwa malonguwa changed the title [iOS] Click Tab does not response when FlatList during scrolling [iOS] Click on another Tab, but onPress does not response when FlatList during scrolling Mar 20, 2018
@lerpo
Copy link

lerpo commented Mar 20, 2018

me too

@JaxGit
Copy link

JaxGit commented Apr 10, 2018

@malonguwa @lerpo do you guys have issues with the static/scrollable tab control itself, or with the contents inside any tab?
I don't have problems with the former case.
However I do have problems with the latter shows in this gist :
Touchable onPress does not response: when coexists with a FlatList under the same Tab of react-native-scrollable-tab-view and the FlatList is scrolling (only on iOS, all good on Android)

Some refs may be related:
facebook/react-native#12884
facebook/react-native#14240
dancormier/react-native-swipeout#179

@JaxGit
Copy link

JaxGit commented Apr 10, 2018

@malonguwa After I tried using onPressIn or onPressOut instead of onPress as you mentioned, it works for my gist example (SimpleExample or even ScrollableTabsExample) and production code. It doesn't freeze any thing at all (tab control or tab contents).

Don't know what issue you have met, but thank you mate 👍

@malonguwa
Copy link
Author

@JaxGit Thanks for the info, but once you using usch as onPressIn, does it will triger the click event but ignore t

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

4 participants