fix: keyboard catching taps on search component

This commit is contained in:
Adrian Castro
2024-02-13 20:03:37 +01:00
parent 0468b2377d
commit 3b84adf645
2 changed files with 6 additions and 2 deletions

View File

@@ -22,7 +22,10 @@ export default function SearchScreen() {
};
return (
<ScrollView>
<ScrollView
keyboardDismissMode="on-drag"
keyboardShouldPersistTaps="handled"
>
<ScreenLayout
title={
<View className="flex-row items-center">

View File

@@ -1,4 +1,4 @@
import { Image, TouchableOpacity, View } from "react-native";
import { Image, Keyboard, TouchableOpacity, View } from "react-native";
import { useRouter } from "expo-router";
import { Text } from "~/components/ui/Text";
@@ -16,6 +16,7 @@ export default function Item({ data }: { data: ItemData }) {
const { title, type, year, posterUrl } = data;
const handlePress = () => {
Keyboard.dismiss();
router.push({
pathname: "/videoPlayer/loading",
params: { data: JSON.stringify(data) },