Extend ui.number widget #765
Replies: 3 comments 3 replies
-
Thanks for these suggestions, @1081! ui.number('Percentage', value=100, format='%.1f').props('min=50 max=150 step=10 suffix=%').classes('w-20') But we could provide a more official and better documented API, introducing On remaining issue might be, that the format only affects the displayed value. But if you, e.g., input "123.456", the displayed value might be rounded to "123.5", but the value used for computations is still "123.456". Do you think this is a problem? |
Beta Was this translation helpful? Give feedback.
-
hi Falko, Regarding the display format, yes this might be a problem. At least for my kind of application (numerical calculations) this behavior is dangerous. Calculating with different values than displayed is a source of errors. I have the requirement to define or better limit the precision of the input. |
Beta Was this translation helpful? Give feedback.
-
I created PR #790 implementing all discussed features. 🙂 |
Beta Was this translation helpful? Give feedback.
-
First great work with nicegui!
I like to use nicegui to build tools for scientific calculations.
Beta Was this translation helpful? Give feedback.
All reactions