mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-14 18:28:18 +08:00
fix: model parameter load presets config (#2622)
This commit is contained in:
parent
88a095e40e
commit
7beff3fd5a
@ -115,6 +115,11 @@ const ParameterItem: FC<ParameterItemProps> = ({
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if ((parameterRule.type === 'int' || parameterRule.type === 'float') && numberInputRef.current)
|
||||
numberInputRef.current.value = `${renderValue}`
|
||||
}, [value])
|
||||
|
||||
const renderInput = () => {
|
||||
const numberInputWithSlide = (parameterRule.type === 'int' || parameterRule.type === 'float')
|
||||
&& !isNullOrUndefined(parameterRule.min)
|
||||
@ -207,11 +212,6 @@ const ParameterItem: FC<ParameterItemProps> = ({
|
||||
return null
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (numberInputRef.current)
|
||||
numberInputRef.current.value = `${renderValue}`
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className={`flex items-center justify-between ${className}`}>
|
||||
<div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user