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 (
<div className="textarea__wrapper">
<textarea
className={twMerge('textarea', className)}
className={twMerge(
'textarea',
className,
autoResize && 'resize-none'
)}
ref={autoResize ? textareaRef : ref}
{...props}
/>

View File

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