fix: model parameter load presets config (#2622)
This commit is contained in:
parent
88a095e40e
commit
7beff3fd5a
1 changed files with 5 additions and 5 deletions
|
|
@ -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 renderInput = () => {
|
||||||
const numberInputWithSlide = (parameterRule.type === 'int' || parameterRule.type === 'float')
|
const numberInputWithSlide = (parameterRule.type === 'int' || parameterRule.type === 'float')
|
||||||
&& !isNullOrUndefined(parameterRule.min)
|
&& !isNullOrUndefined(parameterRule.min)
|
||||||
|
|
@ -207,11 +212,6 @@ const ParameterItem: FC<ParameterItemProps> = ({
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (numberInputRef.current)
|
|
||||||
numberInputRef.current.value = `${renderValue}`
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`flex items-center justify-between ${className}`}>
|
<div className={`flex items-center justify-between ${className}`}>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue