PedroBern / react-native-collapsible-tab-view

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

Tab press issue #320

Open Muhammadmahadsaeed opened 1 year ago

Muhammadmahadsaeed commented 1 year ago

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>

JamilAmmag commented 3 months ago

same issue i think persist in android only working fine in ios, any one solve this?