react-native-scrollable-tab-view
react-native-scrollable-tab-view copied to clipboard
scrollview jumps on orientation change
When you enable orientation change the lock itself on pixel position, all the tabs rerender to fit the new width, but scroll is locked so in the view you see different tab than before, the animation slides to the new position of selected tab. See recording
The code with minimal implementation to reproduce the bug is available on github.com/lenkavon/rn-orientation-playground
There is also generalised question on stackoverflow
Why was this closed? Was it fixed?
Thanks for reopening this. With locked={true}
and scrollWithoutAnimation={true}
, it's still causing my app scroll to the other tabs briefly on changing orientation. scrolling???
is being consoled out when the orientation changes. I would think that shouldn't be triggering? I'm using version 0.10.0 of this library and react native 0.55.3.
I have also noticed that if you leave it on the first tab and change orientation it's fine, but when you go to the other tabs, that's when it starts to act up.
<ScrollableTabView
tabBarPosition="bottom"
locked={true}
renderTabBar={() => <MyTabBar />}
scrollWithoutAnimation={true}
onScroll={() => console.log('scrolling???')}
>
There's no problem with TAB switching on ios, and not only is the content not shown on android, it's also hard to switch
I'm having this problem on iOS.
I fix with it code but the swipe don't work
<ScrollableTabView
style={{
width:Dimensions.get('window').width,
height:Dimensions.get('window').height,
}}
contentStyle={{
width:Dimensions.get('window').width,
height:Dimensions.get('window').height,
}}
@lenkavon did u get the fix for this?
Any update for this fix?
Any solution ??? scrollWithoutAnimation={true} make design crash while rotating
Same here