mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-18 07:15:52 +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'>
|
<div className='grow text-xs text-start leading-[18px] font-normal truncate'>
|
||||||
{!triggerContent ? t('common.tag.addTag') : triggerContent}
|
{!triggerContent ? t('common.tag.addTag') : triggerContent}
|
||||||
</div>
|
</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>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,12 @@ const RunOnce: FC<IRunOnceProps> = ({
|
|||||||
placeholder={`${item.name}${!item.required ? `(${t('appDebug.variableTable.optional')})` : ''}`}
|
placeholder={`${item.name}${!item.required ? `(${t('appDebug.variableTable.optional')})` : ''}`}
|
||||||
value={inputs[item.key]}
|
value={inputs[item.key]}
|
||||||
onChange={(e) => { onInputsChange({ ...inputs, [item.key]: e.target.value }) }}
|
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}
|
maxLength={item.max_length || DEFAULT_VALUE_MAX_LEN}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user