Tab press issue
I am using react-native-collapsible-tab-view when and I have dynamic tabs from API. I want a data to call further api when click on tab. here is my code
<Tabs.Container
renderHeader={Header}
renderTabBar={props => (
<MaterialTabBar
{...props}
indicatorStyle={styles.indicator}
scrollEnabled={true}
labelStyle={styles.labelStyle}
/>
)}
>
{catTab.length > 0 && catTab.map((el, index) => (
<Tabs.Tab
onTabChange={(index) => {
console.log(Tab was pressed,el);
}}
name={el.catName}
key={index}>
<Tabs.FlatList
data={items}
showsVerticalScrollIndicator={false}
renderItem={({ item }) => (
<AddItem
item={item}
addToCart={addToCart}
setAddToCart={setAddToCart}
/>
)}
ListFooterComponent={
Boolean(addToCart.length) && (
<CustomButton
text={
'Go to cart SAR 24'
}
large={true}
onPress={() => navigation.navigate(routes.orders.details)}
/>
)
}
contentContainerStyle={{ margin: 20, marginBottom: 0 }}
/>
</Tabs.Tab>
))}
</Tabs.Container>
same issue i think persist in android only working fine in ios, any one solve this?