-
-
Notifications
You must be signed in to change notification settings - Fork 609
fix(android): disappearing search icon on opening transparent modal #2274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c6cf207
Added repro
alduzy fcc0afa
not updating menu when transparent
alduzy 4a637fb
format
alduzy e83fe21
clean up repro
alduzy f45a024
added code comment
alduzy 52803b1
Merge remote-tracking branch 'origin/main' into @alduzy/android-trans…
alduzy 07cd5fe
moved isTransparent to screen
alduzy 76b7ec2
using isTransparent method in added condition
alduzy 41a9e19
renamed val
alduzy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| import { NavigationContainer } from '@react-navigation/native'; | ||
| import { | ||
| NativeStackScreenProps, | ||
| createNativeStackNavigator, | ||
| } from '@react-navigation/native-stack'; | ||
| import React from 'react'; | ||
| import { Button, StyleSheet, Text, View } from 'react-native'; | ||
| import { GestureHandlerRootView } from 'react-native-gesture-handler'; | ||
|
|
||
| type StackParamList = { | ||
| Home: undefined; | ||
| Details: undefined; | ||
| }; | ||
|
|
||
| const Stack = createNativeStackNavigator<StackParamList>(); | ||
|
|
||
| function HomeScreen({ | ||
| navigation, | ||
| }: NativeStackScreenProps<StackParamList, 'Home'>) { | ||
| return ( | ||
| <View style={styles.container}> | ||
| <Text>Home Screen</Text> | ||
| <Button | ||
| title="Open Modal" | ||
| onPress={() => navigation.navigate('Details')} | ||
| /> | ||
| </View> | ||
| ); | ||
| } | ||
| function DetailScreen({ | ||
| navigation, | ||
| }: NativeStackScreenProps<StackParamList, 'Details'>) { | ||
| return ( | ||
| <View style={styles.container}> | ||
| <Text>DetailScreen</Text> | ||
| <Button title={'Bo Back'} onPress={navigation.goBack} /> | ||
| </View> | ||
| ); | ||
| } | ||
|
|
||
| export default function App(): React.JSX.Element { | ||
| return ( | ||
| <GestureHandlerRootView style={{ flex: 1 }}> | ||
| <NavigationContainer> | ||
| <Stack.Navigator> | ||
| <Stack.Screen | ||
| options={{ | ||
| headerSearchBarOptions: { | ||
| autoCapitalize: 'none', | ||
| placement: 'stacked', | ||
| hideWhenScrolling: false, | ||
| shouldShowHintSearchIcon: false, | ||
| hideNavigationBar: true, | ||
| tintColor: 'blue', | ||
| textColor: 'black', | ||
| hintTextColor: 'black', | ||
| headerIconColor: 'black', | ||
| }, | ||
| }} | ||
| name="Home" | ||
| component={HomeScreen} | ||
| /> | ||
| <Stack.Screen | ||
| name="Details" | ||
| component={DetailScreen} | ||
| options={{ | ||
| headerShown: false, | ||
| presentation: 'transparentModal', | ||
| }} | ||
| /> | ||
| </Stack.Navigator> | ||
| </NavigationContainer> | ||
| </GestureHandlerRootView> | ||
| ); | ||
| } | ||
|
|
||
| const styles = StyleSheet.create({ | ||
| container: { | ||
| flex: 1, | ||
| alignItems: 'center', | ||
| justifyContent: 'center', | ||
| }, | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.