From b8a0d25c09b22d95a6a1eb512172a9ec1ed682b0 Mon Sep 17 00:00:00 2001 From: JaPatryk Date: Tue, 3 Jun 2025 21:51:33 +0200 Subject: [PATCH] keyboard avoidiing fix --- ArtisanConnect/app/(tabs)/notices.jsx | 18 ++++++++---- ArtisanConnect/package-lock.json | 40 +++++++++++++++++++++++++++ ArtisanConnect/package.json | 1 + 3 files changed, 54 insertions(+), 5 deletions(-) diff --git a/ArtisanConnect/app/(tabs)/notices.jsx b/ArtisanConnect/app/(tabs)/notices.jsx index 1082cb4..b70d035 100644 --- a/ArtisanConnect/app/(tabs)/notices.jsx +++ b/ArtisanConnect/app/(tabs)/notices.jsx @@ -11,6 +11,8 @@ import { listCategories } from "@/api/categories"; import { FormControl, FormControlLabel } from "@/components/ui/form-control"; import { Input, InputField } from "@/components/ui/input"; import { HStack } from "@/components/ui/hstack"; +import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'; +import { KeyboardAvoidingView, Platform } from "react-native"; import { Actionsheet, ActionsheetContent, @@ -32,6 +34,7 @@ import { SelectDragIndicatorWrapper, SelectItem, } from "@/components/ui/select"; +import { ScrollView } from "react-native-gesture-handler"; export default function Notices() { // Hooks @@ -224,11 +227,16 @@ export default function Notices() { - + + - + @@ -254,9 +262,9 @@ export default function Notices() { - + - + setShowSortSheet(false)}> diff --git a/ArtisanConnect/package-lock.json b/ArtisanConnect/package-lock.json index 8f6d65e..faa1d30 100644 --- a/ArtisanConnect/package-lock.json +++ b/ArtisanConnect/package-lock.json @@ -47,6 +47,7 @@ "react-native": "0.79.2", "react-native-css-interop": "^0.1.22", "react-native-gesture-handler": "~2.24.0", + "react-native-keyboard-aware-scroll-view": "^0.9.5", "react-native-reanimated": "~3.17.4", "react-native-safe-area-context": "5.4.0", "react-native-screens": "~4.10.0", @@ -8861,6 +8862,23 @@ "node": ">= 6" } }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT" + }, "node_modules/proxy-from-env": { "version": "1.1.0", "license": "MIT" @@ -9131,6 +9149,15 @@ "react-native": "*" } }, + "node_modules/react-native-iphone-x-helper": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz", + "integrity": "sha512-HOf0jzRnq2/aFUcdCJ9w9JGzN3gdEg0zFE4FyYlp4jtidqU03D5X7ZegGKfT1EWteR0gPBGp9ye5T5FvSWi9Yg==", + "license": "MIT", + "peerDependencies": { + "react-native": ">=0.42.0" + } + }, "node_modules/react-native-is-edge-to-edge": { "version": "1.1.7", "license": "MIT", @@ -9139,6 +9166,19 @@ "react-native": "*" } }, + "node_modules/react-native-keyboard-aware-scroll-view": { + "version": "0.9.5", + "resolved": "https://registry.npmjs.org/react-native-keyboard-aware-scroll-view/-/react-native-keyboard-aware-scroll-view-0.9.5.tgz", + "integrity": "sha512-XwfRn+T/qBH9WjTWIBiJD2hPWg0yJvtaEw6RtPCa5/PYHabzBaWxYBOl0usXN/368BL1XktnZPh8C2lmTpOREA==", + "license": "MIT", + "dependencies": { + "prop-types": "^15.6.2", + "react-native-iphone-x-helper": "^1.0.3" + }, + "peerDependencies": { + "react-native": ">=0.48.4" + } + }, "node_modules/react-native-reanimated": { "version": "3.17.5", "license": "MIT", diff --git a/ArtisanConnect/package.json b/ArtisanConnect/package.json index c8f9b57..4ff2af0 100644 --- a/ArtisanConnect/package.json +++ b/ArtisanConnect/package.json @@ -48,6 +48,7 @@ "react-native": "0.79.2", "react-native-css-interop": "^0.1.22", "react-native-gesture-handler": "~2.24.0", + "react-native-keyboard-aware-scroll-view": "^0.9.5", "react-native-reanimated": "~3.17.4", "react-native-safe-area-context": "5.4.0", "react-native-screens": "~4.10.0",