react-native-scrollable-tab-view
react-native-scrollable-tab-view copied to clipboard
Error Switching between tabs
trafficstars
<ScrollableTabView style={{ flex: 1 }} category={this.state.selectedCategory} showsHorizontalScrollIndicator={false} prerenderingSiblingsNumber={1} initialPage={0}
onChangeTab={(res =>
this.setState({ currentTab: res.i, showClearForFilters: false }))
}
renderTabBar={() => <ScrollableTabBar />}
>
{tabs.map((item, index) => (
<ProductList
index={index}
hideShowCategories={() => {
if (!this.state.firstTimeClosed) {
this.setState({
firstTimeClosed: true,
showCategories: false,
});
}
}}
tabs={tabs}
showClearForFilters={this.state.showClearForFilters}
item={item}
sortByType={sortByType}
groceryId={this.props.item.id}
category={this.state.selectedCategory}
navigation={this.props.navigation}
tabLabel={item.name ? item.name : item.title}
/>
))}
</ScrollableTabView>