fix: disabled native resize textarea when textarea autogrowing (#4326)

* fix: disabled native resize textarea when textarea autogrowing

* fix: disabled auto resize on instruction field
This commit is contained in:
Faisal Amir 2024-12-23 21:39:22 +08:00 committed by GitHub
parent 56d1ffa136
commit e8e5c8c5f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -34,7 +34,11 @@ const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(
return ( return (
<div className="textarea__wrapper"> <div className="textarea__wrapper">
<textarea <textarea
className={twMerge('textarea', className)} className={twMerge(
'textarea',
className,
autoResize && 'resize-none'
)}
ref={autoResize ? textareaRef : ref} ref={autoResize ? textareaRef : ref}
{...props} {...props}
/> />

View File

@ -257,7 +257,7 @@ const ThreadRightPanel = () => {
id="assistant-instructions" id="assistant-instructions"
placeholder="Eg. You are a helpful assistant." placeholder="Eg. You are a helpful assistant."
value={activeAssistant?.instructions ?? ''} value={activeAssistant?.instructions ?? ''}
autoResize // autoResize
onChange={onAssistantInstructionChanged} onChange={onAssistantInstructionChanged}
/> />
</div> </div>