# \`st.button\` not resetting after \`st.rerun\`

**URL:** <https://discuss.streamlit.io/t/st-button-not-resetting-after-st-rerun/54888>\
**Category:** Using Streamlit\
**Created:** [November 7, 2023, 2:14am UTC](https://discuss.streamlit.io/t/st-button-not-resetting-after-st-rerun/54888 "2023-11-07T02:14:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesbraza](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/jamesbraza/32/34189_2.png) [@jamesbraza](https://discuss.streamlit.io/u/jamesbraza)\
**Post date:** [November 7, 2023, 2:14am UTC](https://discuss.streamlit.io/t/st-button-not-resetting-after-st-rerun/54888/1 "2023-11-07T02:14:04Z")

</div>

I am using Python 3.11 with Streamlit 1.28.0:

```python
import streamlit as st

print("before")
if st.button("Refresh"):
    st.rerun()
print("after")

```

After pressing the button to re-run the page, the `st.button` never resets.

What am I doing wrong here?

---

<div class="post-metadata">

**Author:** ![willhuang](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/willhuang/32/8445_2.png) [@willhuang](https://discuss.streamlit.io/u/willhuang)\
**Post date:** [November 7, 2023, 2:53am UTC](https://discuss.streamlit.io/t/st-button-not-resetting-after-st-rerun/54888/2 "2023-11-07T02:53:10Z")

</div>

Hi @jamesbraza ,

We recently published a patch that should fix it. Please upgrade to 1.28.1.

Thanks,

Happy streamlitting!

William

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/streamlit/original/3X/c/f/cf4c2ee0d938358f82448c5fe4b9c3c91d7ce19c.svg) [@system](https://discuss.streamlit.io/u/system)\
**Post date:** [November 9, 2023, 2:53am UTC](https://discuss.streamlit.io/t/st-button-not-resetting-after-st-rerun/54888/3 "2023-11-09T02:53:47Z")

</div>

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