fix: model parameter stop sequence (#1885)

This commit is contained in:
zxhlyh 2024-01-03 17:15:29 +08:00 committed by GitHub
parent a8ff2e95da
commit 4e1cd75f6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,8 +63,13 @@ const ParameterItem: FC<ParameterItemProps> = ({
const handleChange = (v: ParameterValue) => { const handleChange = (v: ParameterValue) => {
setLocalValue(v) setLocalValue(v)
if (!isNullOrUndefined(value) && onChange)
onChange(v) if (onChange) {
if (parameterRule.name === 'stop')
onChange(v)
else if (!isNullOrUndefined(value))
onChange(v)
}
} }
const handleNumberInputChange = (e: React.ChangeEvent<HTMLInputElement>) => { const handleNumberInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {