FastUI icon indicating copy to clipboard operation
FastUI copied to clipboard

ModelForm float fields are forced to take values +/- 1 from the current value

Open fmrib00 opened this issue 1 year ago • 3 comments

image

The field is defined as: weight_kg_per_kpcs: float | None = Field(None, ge=0.0)

fmrib00 avatar Dec 28 '23 11:12 fmrib00

Is this a bug or I am not doing the right thing? Any workarounds are highly appreciated!

fmrib00 avatar Dec 28 '23 11:12 fmrib00

I think we need to add support for step.

And maybe set the default to 0.1 for floats?

samuelcolvin avatar Dec 28 '23 11:12 samuelcolvin

step being 1 is ok as long as float numbers are not rejected because of the step size.

fmrib00 avatar Dec 28 '23 12:12 fmrib00