-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
This took me forever to hunt down what was even causing my problem, and frankly I'm stumped as to the underlying issue and how to solve it.
Code
<ScrollableTabView
renderTabBar={() => (
<TabBar
underlineColor="black"
activeTabTextStyle={{ color: 'black' }}
tabBarTextStyle={{
color: 'rgba(0,0,0,0.5)',
fontSize: 16, // <--- spoiler alert: this is causing my issue
fontWeight: 'bold',
}}
tabBarStyle={{
borderBottomColor: colors.lightGray,
}}
/>
)}
>
<FlatList
tabLabel={{ label: 'users' }}
data={userData}
renderItem={this.renderUserItem}
refreshControl={
<RefreshControl
refreshing={this.state.usersRefreshing}
onRefresh={this.refreshUsers}
/>
}
/>
<FlatList
tabLabel={{ label: 'groups' }}
data={groupData}
renderItem={this.renderGroupItem}
refreshControl={
<RefreshControl
refreshing={this.state.usersRefreshing}
onRefresh={this.refreshUsers}
/>
}
/>
</ScrollableTabView>everything works well, EXCEPT with the FlatList when the list is shorter than the height of my screen (i.e. only two or three elements) I cannot scroll the FlatList AND I cannot pullToRefresh
The Fix
After trying everything, I found that if I removed the fontSize: 16 from the tabBarTextStyle on the TabBar all my scrolling worked as expected on the FlatList. Not ideal, but something I can deal with for now.
Any idea why this might be or how I can apply a fontSize without it disabling my scrolling on these FlatLists?
Metadata
Metadata
Assignees
Labels
No labels