react-native-collapsible-tab-view icon indicating copy to clipboard operation
react-native-collapsible-tab-view copied to clipboard

No content rendered when the tab navigation is inside a ScrollView.

Open YoucefBen47 opened this issue 11 months ago • 10 comments

We were facing an issue after upgrading React Native and the navigation packages to the latest versions. Not sure if it's react-native-tab-view or react-native-pager-view but the content of the Material Top Tab was blank when inside a ScrollView. I found suggestions to use your package however it's the same issue. Is there a way to fix this ?

YoucefBen47 avatar Mar 23 '24 11:03 YoucefBen47

+1 I was facing same I removed lazy

Ritik5Prasad avatar Apr 29 '24 13:04 Ritik5Prasad

    lazy
    cancelLazyFadeIn
    // cancelTranslation
    // lazy Android Issue Content not Visible
    
    Write it like this

Ritik5Prasad avatar Apr 29 '24 13:04 Ritik5Prasad

This also happened to us. Looks like this is due to [email protected] and the new architecture they are working on. If you upgrade to [email protected] it should fix the issue (as they enforced the legacy architecture in this version).

Kerumen avatar Apr 30 '24 15:04 Kerumen

I am having same issue, I was not using lazy at the first place. Issue is specific to android, working fine on iOS.

MohsinAtArbisoft avatar May 05 '24 14:05 MohsinAtArbisoft

The same issue, problems only on Android. Any ideas?

DSKonstantin avatar May 07 '24 18:05 DSKonstantin

I resolved it my removing flex: 1 from child component of Tabs.Tab. @DSKonstantin

<Tabs.Tab name={'name'}>
<View /> // this view should not have flex: 1
</Tabs.Tab>

MohsinAtArbisoft avatar May 07 '24 18:05 MohsinAtArbisoft

Thank you @MohsinAtArbisoft

For me helped:

<Tabs.Container
        lazy
        cancelLazyFadeIn 
        .....
>
  <Tabs.Tab name="followers" label={`Followers ${followersCount || 0}`}>
         <View style={{height: '100%'}}>
             <Tabs.FlashList />
.......

DSKonstantin avatar May 07 '24 18:05 DSKonstantin

Thank you @MohsinAtArbisoft

For me helped:


<Tabs.Container

        lazy

        cancelLazyFadeIn 

        .....

>

  <Tabs.Tab name="followers" label={`Followers ${followersCount || 0}`}>

         <View style={{height: '100%'}}>

             <Tabs.FlashList />

.......

Yeah this is exactly how I set it up as well 👍

FabianDean avatar May 07 '24 19:05 FabianDean

I resolved it my removing flex: 1 from child component of Tabs.Tab. @DSKonstantin

<Tabs.Tab name={'name'}>
<View /> // this view should not have flex: 1
</Tabs.Tab>

This worked for me as well.

bkensey avatar Jun 12 '24 02:06 bkensey

I have been stuck with this problem with all the available tab components out there, everyone suggested this component as the one that worked with ScrollView, now when I gone ahead and tried it, it' doesn't work, I treid all the solution provided here and they didn't fix it.

I have just latterly recreated my whole project again in the new Expo API including the expo-routing, had to reorganize my code from scratch, and now after all of that, I am having that problem still there.

<ScrollView>
    <Tabs.Container renderHeader={Header} lazy cancelLazyFadeIn>
        <Tabs.Tab name='Test'>
            <View>
                <Text>Test Text</Text>
            </View>
        </Tabs.Tab>
    </Tabs.Container>
</ScrollView>

AhmedAhmedEG avatar Jun 30 '24 15:06 AhmedAhmedEG