diff --git a/native/chat/chat-thread-list-search.react.js b/native/chat/chat-thread-list-search.react.js
--- a/native/chat/chat-thread-list-search.react.js
+++ b/native/chat/chat-thread-list-search.react.js
@@ -1,6 +1,7 @@
// @flow
import * as React from 'react';
+import { TextInput as BaseTextInput } from 'react-native';
import Animated from 'react-native-reanimated';
import type { SearchStatus } from './chat-thread-list.react.js';
@@ -24,7 +25,7 @@
+innerSearchAutoFocus?: boolean,
+innerSearchActive?: boolean,
};
-function ChatThreadListSearch(props: Props): React.Node {
+function ForwardedChatThreadListSearch(props: Props, ref): React.Node {
const {
searchText,
onChangeText,
@@ -79,7 +80,6 @@
],
[searchCancelButtonProgress, styles.cancelSearchButtonText],
);
- const searchInputRef = React.useRef();
return (
<>
@@ -147,4 +147,13 @@
backgroundColor: 'listBackground',
},
};
+
+const ChatThreadListSearch: React.AbstractComponent<
+ Props,
+ React.ElementRef,
+> = React.forwardRef>(
+ ForwardedChatThreadListSearch,
+);
+ChatThreadListSearch.displayName = 'ChatThreadListSearch';
+
export default ChatThreadListSearch;
diff --git a/native/chat/chat-thread-list.react.js b/native/chat/chat-thread-list.react.js
--- a/native/chat/chat-thread-list.react.js
+++ b/native/chat/chat-thread-list.react.js
@@ -246,6 +246,7 @@
searchStatus={searchStatus}
onSearchCancel={onSearchCancel}
innerSearchActive={false}
+ ref={searchInputRef}
/>
@@ -361,6 +362,7 @@
searchStatus={searchStatus}
onSearchCancel={onSearchCancel}
innerSearchAutoFocus={true}
+ ref={searchInputRef}
/>
);