Commit 13116fe3 authored by StyleZhang's avatar StyleZhang

fix: model parameter load presets config

parent dd961985
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment