-
-
Notifications
You must be signed in to change notification settings - Fork 585
Description
Description
Current behavior
The headerTitle component starts with a placeholder title (in this case just a dash):
And when the actual title loads asynchronously, the width stays the same as when it only had the dash, cutting of the complete tilte (in this case the text "Header Title"): This happens when using either react native 0.77 or 0.78.I'm only using a simple text as a custom headerTitle, but in my actual app I use a more complex header title structure with a title and a subtitle that has content which is loaded asynchronously and depends on a global context so it can't be solved by just using the children param received by the headerTitle.
Expected behavior
I'd expect that the width of the headerTitle is recalculated based on the component's width.
The title should go from the placeholder value ("-")
To the new title loaded asynchronously ("Header Title") and let all the content be visible: I can fix this by passing the `Header` component from the `elements` library to the `header` option for the stack or for the screen, but it's no longer native and it has different styles like adding a bottom border, when the native one just has a bottom shadow.Steps to reproduce
Open a Nested screen within stack navigator for the first time with Customer headerTitle
Snack or a link to a repository
https://github.com/DGVIP/react-navigation-header-title-issue
Screens version
4.10.0
React Native version
0.78.1
Platforms
iOS
JavaScript runtime
None
Workflow
None
Architecture
Fabric (New Architecture)
Build type
None
Device
iOS simulator
Device model
No response
Acknowledgements
Yes