Closed wesleyvandevoorde closed 6 years ago
Any luck @wesleyvandevoorde ?
@vipinconqsys I couldn't really find a clean solution within this library, that's why I decided to wrap the whole component in a view and disable the pointer-events. Works like a charm
<View style={theme.container} pointerEvents={showContent ? 'auto' : 'none'}>
<ScrollableTabView
onChangeTab={this.onChangeTab}
initialPage={getTabIndex(this.props.tabKey)}
tabBarTextStyle={styles.title}
tabBarBackgroundColor={S.COLOR_BLUE_DARK}
tabBarUnderlineStyle={showContent ? styles.tabIndicator : styles.disabledTabIndicator}
tabBarActiveTextColor={showContent ? S.COLOR_SECONDARY : S.COLOR_DISABLED_TABS}
tabBarInactiveTextColor={showContent ? S.COLOR_WHITE : S.COLOR_DISABLED_TEXT}
>
{tabLabels.map((tabLabel, index) => (
this.props.source ?
mapping[index] !== 'stations' &&
<SearchTabSingle
tabLabel={tabLabel}
tabKey={mapping[index]}
key={mapping[index]}
source={this.props.source}
page={this.props.page}
/>
:
<SearchTab tabLabel={tabLabel} tabKey={mapping[index]} key={mapping[index]} showContent={showContent} />
))}
</ScrollableTabView>
</View>
@wesleyvandevoorde I can't understand your sample code likes showContent SearchTabSingle (this.props.source) SearchTabSingle
I'm currently looking for a way to disable the whole tabbar. So it still shows up but you can't select the tabs nor can swipe between them. Is there any way I can achieve this? Swiping can be disabled with the locked property but I can't find a way to disable taps.