I have the below code:
def fill_values(key, list: list):
if st.session_state[key]:
logging.warning("checkbox is true")
st.session_state[key] = list
else:
logging.warning("checkbox is false")
st.session_state[key] = []
# Create PLA filter
if "plaCheckboxKey" not in st.session_state:
st.session_state.plaCheckboxKey = True
plaCheckbox = col1.checkbox("Select all Priority learning areas", key="plaCheckboxKey", on_change=fill_values, args=("plaCheckboxKey", pla_list) )
and that code gives me this error: an integer is required (got type list) and I am not sure why.
I am passing the exact same arguments in the multiselect below and not getting any error with that, so not sure why I am getting it with the checkbox.