From 53d9e95a77376cbb7e638478700a46b90c45ea03 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 18 Apr 2024 15:17:22 -0300 Subject: [PATCH] fix(feedback-screen): close keyboard when click outside --- ios/Podfile.lock | 2 +- .../problem-feedback-screen/index.js | 55 +++++++------ .../specific-problem-feedback-screen/index.js | 82 ++++++++++--------- 3 files changed, 72 insertions(+), 67 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 6a72c077..ca5cae70 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -688,4 +688,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 2150a475300a6ab8ed132d21f86d021d893dd86c -COCOAPODS: 1.11.3 +COCOAPODS: 1.15.2 diff --git a/src/screens/feedback-screen/problem-feedback-screen/index.js b/src/screens/feedback-screen/problem-feedback-screen/index.js index 63f0739f..56b12c0f 100644 --- a/src/screens/feedback-screen/problem-feedback-screen/index.js +++ b/src/screens/feedback-screen/problem-feedback-screen/index.js @@ -199,14 +199,10 @@ const ProblemFeedbackScreen = ({ route }) => { return ( - - - {questionTitle} - - - { + + {questionTitle} + + { feedbackOptions.map((option) => { return ( @@ -220,8 +216,12 @@ const ProblemFeedbackScreen = ({ route }) => { ); }) } - + + checkOption('other')} multiline @@ -230,25 +230,26 @@ const ProblemFeedbackScreen = ({ route }) => { setStepDetalied(newText); }} /> + + + + + {t('app.customFeedback.defaultButtons.next')} + + + + + + {skipButton} + + + - - - {t('app.customFeedback.defaultButtons.next')} - - - - - - {skipButton} - - - - ); }; diff --git a/src/screens/feedback-screen/specific-problem-feedback-screen/index.js b/src/screens/feedback-screen/specific-problem-feedback-screen/index.js index d3a1d155..150c2efd 100644 --- a/src/screens/feedback-screen/specific-problem-feedback-screen/index.js +++ b/src/screens/feedback-screen/specific-problem-feedback-screen/index.js @@ -1,5 +1,7 @@ import React, { useCallback, useState } from 'react'; -import { BackHandler, KeyboardAvoidingView, Platform } from 'react-native'; +import { + BackHandler, KeyboardAvoidingView, Platform, TouchableWithoutFeedback, Keyboard +} from 'react-native'; import { useFocusEffect, useNavigation } from '@react-navigation/native'; import { useHeaderHeight } from '@react-navigation/elements'; import { useTranslation } from 'react-i18next'; @@ -203,45 +205,47 @@ const SpecificProblemFeedbackScreen = ({ route }) => { }; return ( - - {questionTitle} - - - {renderOptions()} - - - - checkOption('other')} - multiline - value={stepDetalied} - onChangeText={(newText) => { - setStepDetalied(newText); - }} - /> - - - - + + {questionTitle} + + + {renderOptions()} + + + - {t('app.customFeedback.defaultButtons.next')} - - - - - - {skipButton} - - - + checkOption('other')} + multiline + value={stepDetalied} + onChangeText={(newText) => { + setStepDetalied(newText); + }} + /> + + + + + {t('app.customFeedback.defaultButtons.next')} + + + + + + {skipButton} + + + + ); };