fix: ensure number types always have integer step of at least 1

This commit is contained in:
Viren070
2025-07-13 18:50:27 +01:00
parent bd3e1477e5
commit ac4d209879
@@ -115,7 +115,13 @@ const TemplateOption: React.FC<TemplateOptionProps> = ({
onChange(value)
}
required={required}
step={constraints?.max ? constraints?.max / 100 : 1}
step={
constraints?.max
? Math.floor(constraints?.max / 100) > 0
? Math.floor(constraints?.max / 100)
: 1
: 1
}
disabled={isDisabled}
/>
{description && (