react-native-pager-view icon indicating copy to clipboard operation
react-native-pager-view copied to clipboard

The first SceneView's height is not full

Open wqcstrong opened this issue 2 years ago • 8 comments

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.

Jun-12-2022 23-26-22

Reproducible Demo

https://snack.expo.dev/@blucas/bottom-blank

wqcstrong avatar Jun 12 '22 15:06 wqcstrong

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' }}
  ....
/>

wqcstrong avatar Jun 12 '22 17:06 wqcstrong

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; image

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.

Davidson-Mike avatar Jun 18 '22 22:06 Davidson-Mike

@troZee Link to a related thread: https://github.com/satya164/react-native-tab-view/issues/1342#issuecomment-1154198807

KrisLau avatar Jun 21 '22 21:06 KrisLau

Any news on this issue? Still appears to be happenning

Saikedo avatar Aug 28 '22 15:08 Saikedo

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.

wqcstrong avatar Sep 09 '22 01:09 wqcstrong

I just tried it with version 6.x and it seems like the issue is still present ?

Saikedo avatar Sep 21 '22 16:09 Saikedo

@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

KrisLau avatar Sep 21 '22 17:09 KrisLau

v5.4.25 did work for me

EricBorland avatar Oct 26 '22 13:10 EricBorland