Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fmrib00 opened this issue Dec 28, 2023 · 3 comments · Fixed by opto-poc-and-archive/FastUI#4 · May be fixed by #227
Open

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

fmrib00 opened this issue Dec 28, 2023 · 3 comments · Fixed by opto-poc-and-archive/FastUI#4 · May be fixed by #227
Milestone

Comments

@fmrib00
Copy link

fmrib00 commented Dec 28, 2023

image

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

@fmrib00 fmrib00 changed the title ModelFrame float fields are forced to take values +/- 1 from the current value ModelForm float fields are forced to take values +/- 1 from the current value Dec 28, 2023
@fmrib00
Copy link
Author

fmrib00 commented Dec 28, 2023

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

@samuelcolvin
Copy link
Member

I think we need to add support for step.

And maybe set the default to 0.1 for floats?

@fmrib00
Copy link
Author

fmrib00 commented Dec 28, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants