PedroBern / react-native-collapsible-tab-view

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

TabBar switching avoid rendering middle tabs #417

Open kashmiry opened 3 weeks ago

kashmiry commented 3 weeks ago

Hello, Thank you to everyone contributing to the amazing work on this package. I am encountering an issue and would appreciate any help or guidance.

Case: I have three tabs: A, B, C. using lazy to avoid rendering all tabs.

<Tabs.Container lazy ...>
  <Tabs.Tab name="A" label="Tab A">
   <ScreenA />
  </Tabs.Tab>
  <Tabs.Tab name="B" label="Tab B">
   <ScreenB />
  </Tabs.Tab>
    <Tabs.Tab name="C" label="Tab C">
   <ScreenC />
  </Tabs.Tab>
</Tabs.Container>

The issue: When I press on Tab C from the tab bar, Tab B which is in between the tabs, is also initiated and rendered. I would like Tab B to render only when I press on it or swipe to it.

Is there a solution or workaround for this behavior?

nerodroid commented 4 days ago

@kashmiry have you find any solution ?