-
Notifications
You must be signed in to change notification settings - Fork 255
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
The keyboard hides every time I type on IOS and android [Expo 52.0.7] #307
Comments
Hey @Camiloadh99, I can confirm that this issue is happening with the latest release. Could you try using version 5.4.0 for the time being until a fix is released? |
having the same issue, tested with v5.4.0 and did not work |
hi @mrlaessig thanks for the reply! <View>
<TextInput
keyboardType={props.searchBy == "code" ? "numeric" : undefined}
value={props.value}
onChangeText={(text) => {
search(text);
setHideResults(false);
}}
placeholder={`${props.searchBy.toUpperCase()}`}
placeholderTextColor="#999"
style={styles.input}
/>
<Autocomplete
keyboardType={props.searchBy == "code" ? "numeric" : undefined}
data={hideResults ? [] : props.data}
value={props.value}
onChangeText={(text) => {
search(text);
setHideResults(false);
}}
renderTextInput={() => <View />}
flatListProps={{
style: {
width: "100%",
margin: 0,
maxHeight: 200,
},
keyboardShouldPersistTaps: "always", //? This is used when the parent have an Scroll View */
renderItem: ({ item }: { item: any }) => (
<Text
style={styles.itemText}
onPress={() => {
handleSelect(item);
changeHideResults(true);
}}
>
<Text style={{ fontWeight: "bold" }}>Code:</Text> {item.code} <Text style={{ fontWeight: "bold" }}>Client:</Text>{" "}
{item.client} <Text style={{ fontWeight: "bold" }}>City:</Text> {item.city}
</Text>
),
}}
/>
</View> and then when i call the component on ios i put it into it's like som elements lose their focus inside the autocomplete with new expo version |
@Camiloadh99 Your workaround helped. But now, i am not able to select any item from the list rendered by renderItem method. Did adding "absolute" solved such issue for you? If so, please share the code snippet. |
Any information on when is the release for this issue is planned? This is a blocker for my team's app. |
The solution provided by Camiloadh99 worked for me, however I've got another issue - on Android it became impossible to handle clicks on the items of the FlatList. const inputRef = useRef<TextInput>(null)
...
return (
...
<AutocompleteInput
...
renderTextInput={() => {
return (
<TextInput
ref={inputRef}
onChangeText={text => {
...
setTimeout(() => inputRef.current?.focus())
}}
...
/>
}
/>
...
) |
Hello, I have a problem in iOS as seen in the video every time I press a number the cell phone keyboard is hidden (is happening too on your demo code)
WhatsApp.Video.2024-11-18.at.3.28.46.PM.mp4
my component
The text was updated successfully, but these errors were encountered: