-
I can't find a form input field that looks like it's good for floats. The spinbox seems useful for integers, but the only thing I can find for float input would be the textbox, and then convert to a float on the backend. Just wanted to check if there's a better built-in solution available. If there's not something available, maybe we could make a new field type called floatbox which is a wrapper for a textbox that verifies that the input is a float. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hi Erin, try setting the |
Beta Was this translation helpful? Give feedback.
-
@mturoci Adjusting the A question I have though is -- it only allows values of the step increments. So the spinner goes from 0.0 to 1.0 and step is 0.1, the user cannot type in something like 0.25 (at least it does not seem like it when I tried). So I guess then maybe what I really need is the textbox with float validation because I am using Wave for a UI for inputting ML hyper-parameters, which often have bounds of 0.0 and 1.0, but can be any value inbetween. What do you think? |
Beta Was this translation helpful? Give feedback.
Hi Erin, try setting the
step
attribute to a float value (e.g. step=0.1) when using spinbox. This should allow for floats with the precision you need. Defaults to 1.