Horizontal ScrollView inside Tab component doesn't work
See original GitHub issueI’m using NativeBase scrollable Tabs and each tab contains a horizontall ScrollView on top and some other contents under the ScrollView. The issue is when I try to scroll the contents inside ScrollView, it does not move and instead, the page (or Tab) scrolls to the other page or tab.
I want to keep locked={false} to slide between tabs. If I set locked = {true} the scrollview works but not the page content sliding.
Anyone knows how to fix this?
react-native : 0.49.3 native-base : 2.3.3
Expected behaviour
ScrollView scrolls horizontally
Actual behaviour
Scrolls to the next tabbed page
Steps to reproduce (code snippet or screenshot)
This is my code
render() {
return (
<Tabs renderTabBar={()=> <ScrollableTab />} style={tabsStyles.tab} initialPage={2}
onChangeTab={page => this.tabChanged(page)}
locked={false}>
<Tab heading="Tab One">
<ScrollView
horizontal
showsHorizontalScrollIndicator={false}
>
<Image source={...}> // There are several images here
</ScrollView>
<PageContent> // This could be any page content
</Tab>
<Tab heading="Tab Two">
<ScrollView
horizontal
showsHorizontalScrollIndicator={false}
>
<Image source={...}> // There are several images here
</ScrollView>
<PageContent> // This could be any page content
</Tab>
<Tab heading="Tab Three">
<ScrollView
horizontal
showsHorizontalScrollIndicator={false}
>
<Image source={...}> // There are several images here
</ScrollView>
<PageContent> // This could be any page content
</Tab>
<Tabs>
);
}
I tested on Android, not sure about iOs
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Horizontal scroll View not scroll? - react native - Stack Overflow
i am working with a react native project but ...
Read more >ScrollView - React Native
Component that wraps platform ScrollView while providing integration with touch locking "responder" system.
Read more >Prototype scrolling with overflow behavior - Figma Help Center
Select the frame in the canvas. Open the Prototype panel in the right sidebar. Update the overflow behavior, choose from: No Scrolling; Horizontal...
Read more >react-native-tab-view - npm
React Native Tab View. A cross-platform Tab View component for React Native. Implemented using react-native-pager-view on Android & iOS, ...
Read more >React Native ScrollView Component - GeeksforGeeks
It provides the scroll functionality in both directions- vertical and horizontal (Default: vertical). It is essential to provide the ScrollView ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
setting locked={true} for Tabs components it worked for me. but still it is a bug very annoying.
any solution other than setting locked={true}