PedroBern / react-native-collapsible-tab-view

A cross-platform Collapsible Tab View component for React Native
MIT License
791 stars 157 forks source link

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

Open YoucefBen47 opened 1 month ago

YoucefBen47 commented 1 month ago

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 ?

Ritik5Prasad commented 2 weeks ago

+1 I was facing same I removed lazy

Ritik5Prasad commented 2 weeks ago
    lazy
    cancelLazyFadeIn
    // cancelTranslation
    // lazy Android Issue Content not Visible

    Write it like this
Kerumen commented 2 weeks ago

This also happened to us. Looks like this is due to react-native-pager-view@6.2.3 and the new architecture they are working on. If you upgrade to react-native-pager-view@6.3.1 it should fix the issue (as they enforced the legacy architecture in this version).

MohsinAtArbisoft commented 2 weeks ago

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

DSKonstantin commented 1 week ago

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

MohsinAtArbisoft commented 1 week ago

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

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

Thank you @MohsinAtArbisoft

For me helped:

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

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 👍