question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable +/- in `st.number_input` if at min/max value

See original GitHub issue

Problem

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:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
KierranFallooncommented, Apr 27, 2021

@brendalf I’m not currently working on this so feel free to give it a shot!

1reaction
vdonatocommented, Apr 20, 2021

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found