Hello everyone,
I have some problems in understanding the new widget behavior of streamlit 0.89.0. Here is a short example:
import streamlit as st
if "checkbox1" not in st.session_state:
st.session_state.checkbox1=True
def on_checkbox_change(changed_checkbox_number):
if changed_checkbox_number==1:
st.session_state.checkbox2=False
elif changed_checkbox_number==2:
st.session_state.checkbox1=False
st.checkbox(label='Checkbox1',key='checkbox1',on_change=on_checkbox_change,args=(1,))
st.checkbox(label='Checkbox2',key='checkbox2',on_change=on_checkbox_change,args=(2,))
On streamlit 0.88.0 this example works well. If you click on one of the two checkboxes the other one is deactivated. But in 0.89.0 it doesn’t work. If you click on one of the checkboxes the other one remains activated in the UI. What is the correct way in streamlit 0.89.0 for implementing such a widget interaction?