From 80a77aeab5e5afc428fdcb7f84240218a503d532 Mon Sep 17 00:00:00 2001 From: Shubham Agrawal Date: Mon, 23 Oct 2023 17:49:21 +0530 Subject: [PATCH] fix focus in tab in newchat --- src/pages/NewChatPage.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js index 9ee5f838aafd..381564b82600 100755 --- a/src/pages/NewChatPage.js +++ b/src/pages/NewChatPage.js @@ -21,6 +21,7 @@ import personalDetailsPropType from './personalDetailsPropType'; import reportPropTypes from './reportPropTypes'; import variables from '../styles/variables'; import useNetwork from '../hooks/useNetwork'; +import useDelayedInputFocus from '../hooks/useDelayedInputFocus'; const propTypes = { /** Beta features list */ @@ -50,6 +51,7 @@ const defaultProps = { const excludedGroupEmails = _.without(CONST.EXPENSIFY_EMAILS, CONST.EMAIL.CONCIERGE); function NewChatPage({betas, isGroupChat, personalDetails, reports, translate, isSearchingForReports}) { + const optionSelectorRef = React.createRef(null); const [searchTerm, setSearchTerm] = useState(''); const [filteredRecentReports, setFilteredRecentReports] = useState([]); const [filteredPersonalDetails, setFilteredPersonalDetails] = useState([]); @@ -210,6 +212,9 @@ function NewChatPage({betas, isGroupChat, personalDetails, reports, translate, i } setSearchTerm(text); }, []); + + useDelayedInputFocus(optionSelectorRef, 600); + return ( 0 ? safeAreaPaddingBottomStyle : {}]}>