Reset radio button value after pushing button

I want to set the value of a radio button back to its default value after pushing a button.

Hey @Aaron_Webber,

This looks related to this post , you could use this same approach but with

Something like this:

import streamlit as st
import SessionState

session = SessionState.get(run_id=0)

if st.button("Reset"):
    session.run_id += 1

options = ["a", "b"]
option_selected ="Label", options, key=session.run_id)
index_selected = options.index(option_selected)

1 Like