fix: all input text box are disabled (#1855)
Signed-off-by: James <james@jan.ai> Co-authored-by: James <james@jan.ai>
This commit is contained in:
parent
4237c46fce
commit
1689702dcd
@ -66,9 +66,6 @@ const ChatInput: React.FC = () => {
|
||||
setIsWaitingToSend(false)
|
||||
sendChatMessage(currentPrompt)
|
||||
}
|
||||
if (textareaRef.current) {
|
||||
textareaRef.current.focus()
|
||||
}
|
||||
}, [
|
||||
activeThreadId,
|
||||
isWaitingToSend,
|
||||
@ -77,11 +74,16 @@ const ChatInput: React.FC = () => {
|
||||
sendChatMessage,
|
||||
])
|
||||
|
||||
useEffect(() => {
|
||||
if (textareaRef.current) {
|
||||
textareaRef.current.focus()
|
||||
}
|
||||
}, [activeThreadId])
|
||||
|
||||
useEffect(() => {
|
||||
if (textareaRef.current) {
|
||||
textareaRef.current.style.height = '40px'
|
||||
textareaRef.current.style.height = textareaRef.current.scrollHeight + 'px'
|
||||
textareaRef.current.focus()
|
||||
}
|
||||
}, [currentPrompt])
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user