react-native-tab-view icon indicating copy to clipboard operation
react-native-tab-view copied to clipboard

feat: add index to 'onSwipeEnd' call

Open tironiigor opened this issue 3 years ago • 1 comments

Motivation

Having the index passed to the onSwipeEnd call allows us to use the latest index after the swipe event. This is useful if you keep the index state in your application and want to avoid rendering issues (animation and wrong tab selection) if you update it using the onIndexChange callback

Test plan

Add the onSwipeEnd call and make sure it's showing the correct value. It should be called after onIndexChange and it should have the same index number

tironiigor avatar May 20 '22 17:05 tironiigor

Hey tironiigor! Thanks for opening your first pull request in this repo. If you haven't already, make sure to read our contribution guidelines.

github-actions[bot] avatar May 20 '22 17:05 github-actions[bot]

Hey @tironiigor, Thanks for your PR unfortunately at the moment we can't merge your PR. It's inconsistent with the API and you can achieve same results with onIndexChange prop.

okwasniewski avatar Sep 01 '22 07:09 okwasniewski