react-native-ui-lib icon indicating copy to clipboard operation
react-native-ui-lib copied to clipboard

TabController asCarousel not changing selected index on swipe

Open patrik-u opened this issue 4 years ago • 3 comments

Description

I've tried following the sample here to create a TabController with asCarousel={true} and I can swipe to change pages, but the selected item on the TabBar remains the same and onChangeIndex isn't called when swiping. It works fine when clicking on the tab bar items.

Related to

Expected behavior

As I swipe to different pages in the TabController the selected tab should change to the page I'm swiping to.

Actual behavior

The selected tab doesn't change.

Screenshots/Video

https://imgur.com/a/T9Iy2kW The visual glitches are from the GIF recording.

Environment

  • React Native: 0.64.3
  • React Native UI Lib: ^6.8.1

Affected platforms

  • [x] Android Not tested on iOS and Web

patrik-u avatar Jan 30 '22 00:01 patrik-u

Can you please check which versions you have installed: npm ls react-native-ui-lib npm ls react-native-reanimated npm ls react-native-gesture-handler and if you use react-native-navigation - npm ls react-native-navigation

Also, notice that on Android, if you using react-native-navigation, you should wrap your screen with gestureHandlerRootHOC from react-native-gesture-handler

lidord-wix avatar Mar 16 '22 14:03 lidord-wix

I have wrapped gestureHandlerRootHOC from react-native-gesture-handler but this does not fix the issue.

It is working fine on iOS but has issues on android. Can you help? @lidord-wix

chaawlaapooja avatar Oct 20 '22 11:10 chaawlaapooja