Open miladdev85 opened 2 years ago
When using LayoutAnimation.configureNext(LayoutAnimation.Presets.linear) - the header is no longer collapsing or updating.
LayoutAnimation.configureNext(LayoutAnimation.Presets.linear)
React.useLayoutEffect(() => { navigation.setOptions({ headerTitle: () => ( <SegmentedControl values={['A', 'B']} selectedIndex={0} onChange={event => { LayoutAnimation.configureNext(LayoutAnimation.Presets.linear); <------- This line breaks collapsing header setIndex(event.nativeEvent.selectedSegmentIndex); }} /> ), headerSearchBarOptions: { onChangeText: event => setSearch(event.nativeEvent.text), hideWhenScrolling: true, cancelButtonText: translations.navigation.cancel, placeholder: translations.navigation.search, }, }); }, [navigation, search]);
I don't have any
3.15.0
0.69.3
iOS
No response
React Native (without Expo)
Paper (Old Architecture)
Debug mode
Real device
iPhone 13 Pro
Yes
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
Description
When using
LayoutAnimation.configureNext(LayoutAnimation.Presets.linear)
- the header is no longer collapsing or updating.Steps to reproduce
Snack or a link to a repository
I don't have any
Screens version
3.15.0
React Native version
0.69.3
Platforms
iOS
JavaScript runtime
No response
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
Real device
Device model
iPhone 13 Pro
Acknowledgements
Yes