wix / react-native-ui-lib

UI Components Library for React Native
https://wix.github.io/react-native-ui-lib/
MIT License
6.57k stars 715 forks source link

Fix error with the TabController and Gesture Handler when passing a ref #3389

Closed nitzanyiz closed 1 week ago

nitzanyiz commented 1 week ago

Description

There was an error occurring when using a tab item with a trailingAccessory which was passed with a ref on it. We're not sure what exactly causes the error but seems like taking the onPress outside of the scope of the handler fixes the error.

Changelog

TabBarItem - onPress taken from props at the beginning.

Additional info

MADS-4537