react-native-scrollable-tab-view
react-native-scrollable-tab-view copied to clipboard
Only initial page is rendered, other pages are empty
Tested on Android, I have 2 tabs (Tab 1 and Tab 2) with just a Text on each tab. I set initialPage = 1, and got this result: Tab 1 = empty Tab 2 = renders correctly
Tested the other way around and only the initialPage renders correctly.
Here's my code:
<ScrollableTabView style={{ marginTop: Platform.OS === 'ios' ? 0 : StatusBar.currentHeight}} collapsableBar={collapsableComponent} initialPage={1} renderTabBar={() => <DefaultTabBar />}> <View style={{ margin: 20 }} tabLabel='Tab 1'> <Text>Tab 1</Text> </View> <View style={{ margin: 20 }} tabLabel='Tab 2'> <Text>Tab 2</Text> </View> </ScrollableTabView>
Here's a video of current behavior: https://mega.nz/#!bPgXhQgI!DW-XS2rME01FVCo_kvg9p5dO94OAXUSjmVqruZ_BNuk
me too
me too, on android
<ScrollableTabView
ref = {ref => { this.tabbar = ref }}
renderTabBar={() => <View/>}
locked={true}
>
<About/>
<BaseNotes/>
<CommonQuestions/>
<PaymentMethods/>
</ScrollableTabView>
on Android, only About View is showed, BaseNotes, CommonQuestions and PaymentMethods not showed.
You may have a try prerenderingSiblingsNumber={Infinity}
Easy way: create ref and goToPage after setTimeout 500ms =]]
If you want to change node_module. 1/ Open folder react-native-scrollable-tab-view in node-module. Open index.js 2/ Find function renderScrollableContent 3/ Replace AnimatedViewPagerAndroid >> ViewPagerAndroid and callback function onPageScroll 4/ Find function goToPage 5/ Remove getNode() of platform android.
Easy way: create ref and goToPage after setTimeout 500ms =]]
If you want to change node_module. 1/ Open folder react-native-scrollable-tab-view in node-module. Open index.js 2/ Find function renderScrollableContent 3/ Replace AnimatedViewPagerAndroid >> ViewPagerAndroid and callback function onPageScroll 4/ Find function goToPage 5/ Remove getNode() of platform android.
Tried to modify the package but it still gives the same issue, anything else we missing here?
Try to upgrade the version of viewpager