Disable +/- in `st.number_input` if at min/max value
See original GitHub issueProblem
The +/- buttons on the right side of st.number_input
always show up. But when the input value is at the min_value
or max_value
of the widget, they don’t do anything. This can be confusing for users because they click but nothing happens.
Solution
Gray out the +/- buttons if the input value is at the min/max value.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
st.number_input - Streamlit Docs
An optional boolean, which disables the number input if set to True. The default is False. This argument can only be supplied by...
Read more >Set min/max on TextField type="number"? - Stack Overflow
The current implementation of TextField sets its own value for inputProps so that the inputClassName is applied to the input element. By handing...
Read more >NumberInput - Mantine
Component has internal state to manage user input, when blur event is triggered internal value is clamped with given min and max values...
Read more >HTML5 Forms: Min, Max, Step Type Attribute - Wufoo
When max and step are set, Chrome may display a narrower input box for number input type, as the length of the largest...
Read more ><input type="number"> - HTML: HyperText Markup Language
On browsers that don't support inputs of type number , a number input falls back to type text . Value. A number representing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@brendalf I’m not currently working on this so feel free to give it a shot!
Whoops, sorry that you didn’t get a response @KierranFalloon.
@brendalf this currently isn’t being worked on, so if either you or @KierranFalloon would like to pick it up, feel free!