This repository was archived by the owner on Nov 27, 2022. It is now read-only.
This repository was archived by the owner on Nov 27, 2022. It is now read-only.
Tabs switch incorrectly when swipe is released over another element #1365
Open
Description
Current behavior
I have a TabView
alongside a sidebar. When a swipe is started on the view and is released at edge of the sidebar, the tab index doesn't change (onIndexChange()
isn't called) but the tab still changes. This leaves the tabs in an incorrect state and some of the tabs can't be switched to.
Screen.Recording.2022-06-23.at.13.48.40.online-video-cutter.com.mp4
Expected behavior
When a full swipe happens then the tab is changed correctly. Perhaps once the swipe leaves the view then it counts it as swiped, rather than waiting until the swipe is released.
Reproduction
I've forked this repo and added the sidebar to the example code. It is run as normal.
https://github.com/aaulthudl/react-native-tab-view
Platform
- Android
- iOS
- Web
- Windows
- MacOS
Environment
package | version |
---|---|
react-native-tab-view | 3.1.1 |
react-native-pager-view | 5.4.9 |
react-native | 0.64.3 |
expo | 44.0.0 |
node | 12.13.0 |
npm or yarn | yarn@v1.22.18 |