-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
Header search bar not working on Android #1906
Comments
@tboba Sorry, is there any way to get it working while waiting for the new version of |
Found the solution: roll back to Version 6.9.14 (https://github.com/react-navigation/react-navigation/releases?q=6.9.14&expanded=true) got this change included: #1825, so doesn't work properly. |
@tboba Hi 👋🏻, I using react-native-navigation on my expo project. When use headerSearchBarOptions not showing search icon on screen header. As you said, when I change the react-native-screens version to 3.26.0, the application stays in the splash screen, which means it crashes. So I'm using the latest version but again the search function still doesn't work. Thank you for your interest 🙏🏻 "dependencies": {
"@expo/vector-icons": "^13.0.0",
"@react-native-async-storage/async-storage": "1.18.2",
"@react-navigation/native": "^6.1.9",
"@react-navigation/native-stack": "^6.9.17",
"@reduxjs/toolkit": "^2.0.1",
"@shopify/flash-list": "1.4.3",
"expo": "~49.0.15",
"expo-font": "~11.4.0",
"expo-splash-screen": "~0.20.5",
"expo-sqlite": "~11.3.3",
"expo-status-bar": "~1.6.0",
"react": "18.2.0",
"react-native": "0.72.6",
"react-native-gesture-handler": "~2.12.0",
"react-native-reanimated": "~3.3.0",
"react-native-safe-area-context": "4.6.3",
"react-native-screens": "^3.29.0",
"react-redux": "^9.0.4"
} useLayoutEffect(() => {
navigation.setOptions({
headerLargeTitle: true,
headerSearchBarOptions: {
inputType: "text",
cancelButtonText: "İptal",
tintColor: colors.primary,
placeholder: "Ürün ara",
onChangeText: (event) => {
setSearch(event.nativeEvent.text);
},
onFocus: () => {
setIsSearchFocused(true);
},
onBlur: () => {
setIsSearchFocused(false);
},
hideWhenScrolling: false
}
});
}, [navigation, colors]); |
@ysnbyzli Hi, thanks for mentioning about that. Can you check if the search bar works for you in the newest version of screens (3.29.0)? Also, your app should not crash there 😃 |
Description
The
headerSearchBarOptions
options doesn't seem to have any effect on Android, while on iOS works fine.Here is my navigator:
Also I'm getting these warnings when building Android:
Steps to reproduce
headerSearchBarOptions
Snack or a link to a repository
https://github.com/APZelos/android-header-search-bar
Screens version
3.25.0
React Native version
0.72.5
Platforms
Android
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
Android emulator
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: