Hi All,
I’m wondering whether I’m doing something wrong or whether it is intentional behavior. I’m creating multiple checkboxes with an on_change function. The on_change function seems to be called for all checkboxes on initialization. In addition, when one changes 1 of the checkboxes, the code seems to call the function for all checkboxes.
My expected behavior was: No callbacks on initialization and one callback of the relevant checkbox on change.
Steps to reproduce
Code snippet:
import streamlit as st
def on_change_checkbox(filter_id):
print(filter_id)
for i in range(0,10):
st.checkbox(str(i), on_change=on_change_checkbox(i))