From 9a1b29043c61625c36e7b0aa69285f979c46c21f Mon Sep 17 00:00:00 2001 From: Puneet Date: Wed, 30 Nov 2022 19:09:05 +0530 Subject: [PATCH 1/2] make save button clickable even when the keyboard is open --- src/pages/ReportSettingsPage.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/ReportSettingsPage.js b/src/pages/ReportSettingsPage.js index c2c35e4c7c7b..b5433792d858 100644 --- a/src/pages/ReportSettingsPage.js +++ b/src/pages/ReportSettingsPage.js @@ -1,6 +1,6 @@ import React, {Component} from 'react'; import PropTypes from 'prop-types'; -import {View, ScrollView} from 'react-native'; +import {View, ScrollView, Keyboard} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; import lodashGet from 'lodash/get'; @@ -88,6 +88,7 @@ class ReportSettingsPage extends Component { } validateAndUpdatePolicyRoomName() { + Keyboard.dismiss(); if (!this.validate()) { return; } @@ -149,7 +150,7 @@ class ReportSettingsPage extends Component { onBackButtonPress={Navigation.goBack} onCloseButtonPress={Navigation.dismissModal} /> - + Date: Fri, 2 Dec 2022 00:14:23 +0530 Subject: [PATCH 2/2] don't dismiss keyboard if validation fails --- src/pages/ReportSettingsPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/ReportSettingsPage.js b/src/pages/ReportSettingsPage.js index b5433792d858..b5001160f86e 100644 --- a/src/pages/ReportSettingsPage.js +++ b/src/pages/ReportSettingsPage.js @@ -88,10 +88,10 @@ class ReportSettingsPage extends Component { } validateAndUpdatePolicyRoomName() { - Keyboard.dismiss(); if (!this.validate()) { return; } + Keyboard.dismiss(); Report.updatePolicyRoomName(this.props.report, this.state.newRoomName); }