streamlit-analytics
streamlit-analytics copied to clipboard
None Selected
Hello,
Defining a selectbox like this :
select = st.selectbox("title", ("A", "B"), index=None)
... I get a KeyError exception at main.py:162
This is caused by the default "None" value. It is changed into an empty space by "replace_empty(...)", but
if selected != st.session_state.state_dict.get(label, None):
goes into the "true" statement, and causes an exception.
The fix at main.py:161:
if selected != st.session_state.state_dict.get(label, " "):
I make a PR or let you fix ...