mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-17 13:35:57 +08:00
fix: event of keyboard "enter" in text generator app (#3823)
This commit is contained in:
parent
2a64ce740e
commit
1a7b4c42ab
@ -232,7 +232,6 @@ const TagSelector: FC<TagSelectorProps> = ({
|
||||
<div className='grow text-xs text-start leading-[18px] font-normal truncate'>
|
||||
{!triggerContent ? t('common.tag.addTag') : triggerContent}
|
||||
</div>
|
||||
<span className='hidden absolute top-[-21px] left-[50%] translate-x-[-50%] px-2 py-[3px] border-[0.5px] border-black/5 rounded-md bg-gray-25 text-gray-700 text-xs font-medium leading-[18px] group-hover/tip:block'>{t('common.tag.editTag')}</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
@ -65,6 +65,12 @@ const RunOnce: FC<IRunOnceProps> = ({
|
||||
placeholder={`${item.name}${!item.required ? `(${t('appDebug.variableTable.optional')})` : ''}`}
|
||||
value={inputs[item.key]}
|
||||
onChange={(e) => { onInputsChange({ ...inputs, [item.key]: e.target.value }) }}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault()
|
||||
onSend()
|
||||
}
|
||||
}}
|
||||
maxLength={item.max_length || DEFAULT_VALUE_MAX_LEN}
|
||||
/>
|
||||
)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user