From ea28c1a05f84e36568c9bb17abe253f59f51ccc7 Mon Sep 17 00:00:00 2001 From: Nam Le Date: Tue, 26 Sep 2023 13:46:13 +0700 Subject: [PATCH] add useFocus prop missing --- src/pages/settings/Report/RoomNamePage.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pages/settings/Report/RoomNamePage.js b/src/pages/settings/Report/RoomNamePage.js index 42d7156660f9..985d83e7fd95 100644 --- a/src/pages/settings/Report/RoomNamePage.js +++ b/src/pages/settings/Report/RoomNamePage.js @@ -2,6 +2,7 @@ import React, {useCallback, useRef} from 'react'; import {withOnyx} from 'react-native-onyx'; import PropTypes from 'prop-types'; import {View} from 'react-native'; +import {useIsFocused} from '@react-navigation/native'; import CONST from '../../../CONST'; import ScreenWrapper from '../../../components/ScreenWrapper'; import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; @@ -48,6 +49,7 @@ function RoomNamePage(props) { const translate = props.translate; const roomNameInputRef = useRef(null); + const isFocused = useIsFocused(); const validate = useCallback( (values) => { @@ -101,6 +103,7 @@ function RoomNamePage(props) { ref={(ref) => (roomNameInputRef.current = ref)} inputID="roomName" defaultValue={report.reportName} + isFocused={isFocused} />