fix: in variable settings, use Textarea to replace Input. (#17864)

This commit is contained in:
Good Wood
2025-04-11 15:24:16 +08:00
committed by GitHub
parent b2f5ca356a
commit fe19cc7568
2 changed files with 18 additions and 8 deletions

View File

@@ -322,9 +322,11 @@ const ChatVariableModal = ({
</div>
<div className='flex'>
{type === ChatVarType.String && (
<Input
placeholder={t('workflow.chatVariable.modal.valuePlaceholder') || ''}
// Input will remove \n\r, so use Textarea just like description area
<textarea
className='system-sm-regular placeholder:system-sm-regular block h-20 w-full resize-none appearance-none rounded-lg border border-transparent bg-components-input-bg-normal p-2 caret-primary-600 outline-none placeholder:text-components-input-text-placeholder hover:border-components-input-border-hover hover:bg-components-input-bg-hover focus:border-components-input-border-active focus:bg-components-input-bg-active focus:shadow-xs'
value={value}
placeholder={t('workflow.chatVariable.modal.valuePlaceholder') || ''}
onChange={e => setValue(e.target.value)}
/>
)}