fix: jarak keyboard

Deskripsi:
- otomatis jarak input dengan keyboard ios

No Issues
This commit is contained in:
2025-08-05 17:24:49 +08:00
parent 1d555bf950
commit 1e2069ca42
11 changed files with 35 additions and 13 deletions

View File

@@ -17,6 +17,7 @@ import { router, Stack, useLocalSearchParams } from "expo-router";
import { useEffect, useState } from "react";
import { KeyboardAvoidingView, Platform, Pressable, ScrollView, View } from "react-native";
import { useSelector } from "react-redux";
import { useHeaderHeight } from '@react-navigation/elements';
type Props = {
id: string
@@ -49,6 +50,7 @@ export default function DetailDiscussionGeneral() {
const [loadingKomentar, setLoadingKomentar] = useState(true)
const arrSkeleton = Array.from({ length: 3 }, (_, index) => index)
const reference = firebase.app().database('https://mobile-darmasaba-default-rtdb.asia-southeast1.firebasedatabase.app').ref(`/discussion-general/${id}`);
const headerHeight = useHeaderHeight();
useEffect(() => {
const onValueChange = reference.on('value', snapshot => {
@@ -197,7 +199,7 @@ export default function DetailDiscussionGeneral() {
</ScrollView>
<KeyboardAvoidingView
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
keyboardVerticalOffset={110}
keyboardVerticalOffset={headerHeight}
>
<View style={[
Styles.contentItemCenter,