Open a-eid opened 6 months ago
this code reproduces the bug as well without the need for tabbar navigator.
const [index, setIndex] = useState(0);
useEffect(() => {
const interval = setInterval(() => {
setIndex((i) => i + 1);
})
return () => {
clearInterval(interval);
}
}, [])
return (
<ScrollView contentInsetAdjustmentBehavior="automatic" key={index}>
<Text style={{ marginTop: 50 }}>test</Text>
</ScrollView>
);
Hi @a-eid, thanks for submitting this issue! I can confirm this issue is reproducible for me. A few remarks I've discovered so far:
collapsable={true}
in Background and View that wraps the children here - https://github.com/react-navigation/react-navigation/blob/main/packages/elements/src/Screen.tsx (I'll submit a PR that fixes this 🫡)_enqueueComponentViewWithComponentHandle
method from RCTComponentViewRegistry) gives the same result as on Paper.Nonetheless, I still haven't got a solution about this bug, but I'll keep you informed 👍
@a-eid Did you find any workaround ?
Only soluton I found is to have each wrapped in a StackNavigator and apply headerLargeTitle. But even with this solution, the large title start collapsed for whatever reason
@a-eid Did you find any workaround ?
I have not, as you mentioned wrapping each tab in it's own navigation stack would solve the issue, however not very ideal for performance.
Description
basically what I have is a single Stack that has a single tabbar screen, the first tab's scrollview pushes the large title as expected but not the others. also I'm having weird issues when enabling
freezeOnBlur
,unmountOnBlur
or lazy.https://github.com/software-mansion/react-native-screens/assets/19273413/2ab8dea4-d00b-4588-859e-31038b8819c0
I posted a snack link, but for some reason the native stack is not working from either RNS or react navigation.
Steps to reproduce
1- create a native stack. 2- nest a tabbar as one of it's screens' 3- for each tabbar screen add a scrollview. ( properly ).
Snack or a link to a repository
https://snack.expo.dev/@aeid/ludicrous-blue-scones
Screens version
3.29.0
React Native version
0.72.6
Platforms
iOS
JavaScript runtime
Hermes
Workflow
Expo managed workflow
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
iOS simulator
Device model
iPhone 14
Acknowledgements
Yes