Streamlit: Streamlit number_input reverting to default in column layout

Created on 12 Oct 2020  路  3Comments  路  Source: streamlit/streamlit

Summary

Streamlit number_input reverts back to default value if clicking + or - buttons or if entering a new value in column layout. I believe that number_input with float does not work in column layout, while integer number_inputs work okay.

https://discuss.streamlit.io/t/problem-with-number-input/3539

Steps to reproduce

What are the steps we should take to reproduce the bug:

    # --- Latitude, Longitude ---  not workign in column layout, working fine in st.number_input
    latitude = c1.number_input('latitude', value=latitude)
    longitude = c1.number_input('longitude', value=longitude)

Expected behavior:

I would expect changes to the number input to not revert to default

Actual behavior:

reversion to default on any change

Is this a regression?

yes, this used to work okay, but I was not using column layouts before.

Debug info

  • Streamlit version: 0.68
  • Python version: 3.7
  • Using Conda
  • OS version: Windows 10
  • Browser version: Chrome
bug needs triage

All 3 comments

Thanks for the report @kurt-rhee, this looks awfully similar to https://github.com/streamlit/streamlit/issues/2145#issuecomment-707377155 hopefully they will be solved together!

Fanilo

@kurt-rhee I believe #2173 should address this problem and it will be in the next release soon. If nightly succeeds tonight, you can also try it out.

Fingers crossed!

Tested out the changes, and things look good in 0.69.0+ Going to close this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aagnone3 picture aagnone3  路  3Comments

randyzwitch picture randyzwitch  路  3Comments

tconkling picture tconkling  路  3Comments

danlester picture danlester  路  3Comments

ShivamBhirud picture ShivamBhirud  路  3Comments