Hi, I have a selectbox that gives me options of what keys I need to read inside a yaml file.
When reading this key, I configure a checkbox with True or False, depending on what is in the key of the yaml file.
This works fine as long as I have no interaction with the checkbox on the page.
If I click on the checkbox in the page, the next choice in the selectbox doesn’t obey what I’m reading from the file yaml, it keeps what I did in my last interaction with the checkbox.
How do I make the checkbox always obey what is in the file yaml. It is the code below that I use to configure the checkbox.
if selected_user in data['preauthorized']['chatbot']:
with col5:
st.session_state.chatbot = st.checkbox('Chatbot', value=True)
else:
with col5:
st.session_state.chatbot = st.checkbox('Chatbot', value=False)
The behavior I expect is that the checkbox always loads with what comes from the yaml file, regardless of my interaction with the Checkbox on the page. Thanks