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)
|
setIsWaitingToSend(false)
|
||||||
sendChatMessage(currentPrompt)
|
sendChatMessage(currentPrompt)
|
||||||
}
|
}
|
||||||
if (textareaRef.current) {
|
|
||||||
textareaRef.current.focus()
|
|
||||||
}
|
|
||||||
}, [
|
}, [
|
||||||
activeThreadId,
|
activeThreadId,
|
||||||
isWaitingToSend,
|
isWaitingToSend,
|
||||||
@ -77,11 +74,16 @@ const ChatInput: React.FC = () => {
|
|||||||
sendChatMessage,
|
sendChatMessage,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (textareaRef.current) {
|
||||||
|
textareaRef.current.focus()
|
||||||
|
}
|
||||||
|
}, [activeThreadId])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (textareaRef.current) {
|
if (textareaRef.current) {
|
||||||
textareaRef.current.style.height = '40px'
|
textareaRef.current.style.height = '40px'
|
||||||
textareaRef.current.style.height = textareaRef.current.scrollHeight + 'px'
|
textareaRef.current.style.height = textareaRef.current.scrollHeight + 'px'
|
||||||
textareaRef.current.focus()
|
|
||||||
}
|
}
|
||||||
}, [currentPrompt])
|
}, [currentPrompt])
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user