react-native-pager-view
react-native-pager-view copied to clipboard
The first SceneView's height is not full
Environment
Package | Version |
---|---|
expo | 45.0.5 |
react | 17.0.2 |
react-native | 0.68.2 |
react-native-tab-view | 3.1.1 |
react-native-pager-view | 5.4.15 |
node | 16.13.2 |
yarn | 1.22.10 |
@react-navigation/native | 6.0.10 |
@react-navigation/native-stack | 6.6.2 |
Description
In my case, if the TabView
be wrapped in the NavigationContainer
which exported from @react-navigation/native
, the first route has a bottom blank.
And I debug the element tree by react-native-debugger, found that the first SceneView's height is incorrectly.
Reproducible Demo
https://snack.expo.dev/@blucas/bottom-blank
As anyone like me may face the issue, here is a temporary solution:
<TabView
navigationState={{ index, routes }}
onIndexChange={setIndex}
initialLayout={{ width: layout.width }}
+ sceneContainerStyle={{ overflow: 'visible' }}
....
/>
Also experiencing this issue. iOS only. If I change the tab and then change back then it will correct itself.
Another related symptom; the scrollbar for the list that is rendered when this occurs also renders wonky, like this;
It also fixes itself after changing the tab and changing back.
Issue is present in both a real device and a simulator. It is not fixed in the latest version.
@troZee Link to a related thread: https://github.com/satya164/react-native-tab-view/issues/1342#issuecomment-1154198807
Any news on this issue? Still appears to be happenning
Any news on this issue? Still appears to be happenning
You can take a try to upgrade the version to 5.4.25
as the comment mentioned.
I just tried it with version 6.x and it seems like the issue is still present ?
@Saikedo try specifically v5.4.25? if it still doesn't work with that version for you it might just be that you need to clean your project after upgrading the package version or you're not running pod install
v5.4.25 did work for me