diff --git a/web/chat/chat-thread-composer.react.js b/web/chat/chat-thread-composer.react.js --- a/web/chat/chat-thread-composer.react.js +++ b/web/chat/chat-thread-composer.react.js @@ -23,7 +23,7 @@ }; function ChatThreadComposer(props: Props): React.Node { - const { userInfoInputArray, otherUserInfos, threadID } = props; + const { userInfoInputArray, otherUserInfos, threadID, inputState } = props; const [usernameInputText, setUsernameInputText] = React.useState(''); @@ -129,6 +129,14 @@ return
{labels}
; }, [userInfoInputArray, onRemoveUserFromSelected]); + React.useEffect(() => { + if (!inputState) { + return; + } + inputState.registerSendCallback(hideSearch); + return () => inputState.unregisterSendCallback(hideSearch); + }, [hideSearch, inputState]); + const threadSearchContainerStyles = React.useMemo( () => classNames(css.threadSearchContainer, {