Hi, i would like to know if this is possible to return valie of st.selectbox to default after we st.rerun.
For example:
all_names = ['red', 'blue', 'green']
name = st.selectbox(
"Add Name",
options=all_names,
index=None,
placeholder="Here you should add your name",
key=dropdown_add_name_key,
label_visibility="collapsed",
)
if name:
print(name)
st.rerun()
I would expect that after rerun, my widget goes back to value of placeholder, namely: “Here you should add your name”. But it does not, as it kept to be the same value as user selected. Is there a way to re-initialize it to placeholder?