react-native-pager-view
react-native-pager-view copied to clipboard
onPageSelected called automatically when navigate to other screen and detachInactiveScreens is false
Environment
"react": "17.0.2",
"react-native": "0.66.2"
"react-native-pager-view": "^6.0.0-rc.0"
"@react-navigation/native": "^6.0.6"
Description
disable the detachInactiveScreens
and navigate to other screen and after came back the page is set to zero onPageSelected event is called every time when I navigate to other screen. Event is working fine when detachInactiveScreens
is true.
Hi, even detachInactiveScreens is not fixing for me. From my testing, it looks like, starting from react-native 0.65.0, onPageSelected(0) is fired(Android only) when you navigate to child stack screen OR coming back from child stack screen
This is still happening with us in production and is a huge issue, does anyone have any idea how to fix? Only starting in > 0.65
I am also facing this problem and downgraded our react-native version to <0.65
@dcphi I think there are some combinations causing this issue.
Because in my case I just did animationEnabled: Platform.OS === 'ios' ? false : true
for Stack.Navigator
screenOptions
.
Just sharing incase if this fixes your case
@RMG0 Thanks for the insight. Unfortunately, this didn't fix the problem for us
I have same problem ; @dcphi did you find a solution ? :/