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 @@ -29,6 +29,7 @@ otherUserInfos, threadID, isThreadSelected, + inputState, } = props; const [usernameInputText, setUsernameInputText] = React.useState(''); @@ -133,6 +134,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, {