Closed Aryk closed 4 years ago
I think you can't customize, you can only update the ListItem component to use TouchableOpacity instead of TouchableHighlight
Hi @Aryk, yes, you cannot customize. For Android, it is TouchableNativeFeedback
and for iOS & web, it is TouchableHighlight
by default.
But you can make changes manually in node_nodules/native-base/src/basic/ListItem.js
from TouchableHighlight
to TouchableOpacity
.
@hanykumar You can but how would I make those changes carry over into production? Or when I re-install node modules?
Really... there should be an ability to pass a way to overwrite the component with your own TouchableHighlight / TouchableNativeFeedback.
For example...if I want it to use TouchableHighlight from react-native-gesture-handler library...how can I do that without something super hacky?
@Aryk There isn't any way to do this in NativeBase. But to achieve this, you can just wrap a ListItem of NativeBase with TouchableOpacity, that should do the trick.
Closing this for now, let us know if you need further clarification/help on this.
I looked through the documentation and cheatsheets.
If I want ListItems to have that TouchableOpacity effect instead of TouchableHighlight, how can that be customized?
That seems it would have to switch what the ListItem is wrapped with.
Is this just something we can't customize?