Streamlit Toggle in Version 1.26 (bug?)

Hey everyone,

I am happy to see that the new st.toggle feature got released with version 1.26. Thank you very much for that!!

I just tried it out and noticed that when clicking anywhere in the row where the toggle widget is placed it activates it.

I uploaded a small example of what I mean here:

Streamlit (toggletest.streamlit.app)

And here is a GIF:

toggle example

Do you have any idea how to prevent this behavior?

Thank you very much for your hard work.

Best regards
Fabian

4 Likes

Hey @Tian,

This definitely sounds like a bug. Thanks for flagging! Do you mind sharing this in our GitHub Issues here?

1 Like

There you go:
st.toggle gets (de)activated when clicking anywhere in the same row Β· Issue #7244 Β· streamlit/streamlit (github.com)

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.