Skip to content

Commit

Permalink
Fix trigger resets with fast reruns (streamlit#7283)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnOctopus authored and Your Name committed Mar 22, 2024
1 parent ccdd22a commit 893c9cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/streamlit/runtime/state/session_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,8 @@ def on_script_will_rerun(self, latest_widget_states: WidgetStatesProto) -> None:
Update widget data and call callbacks on widgets whose value changed
between the previous and current script runs.
"""
# Update ourselves with the new widget_states. The old widget states,
# used to skip callbacks if values haven't changed, are also preserved.
# Clear any triggers that weren't reset because the script was disconnected
self._reset_triggers()
self._compact_state()
self.set_widgets_from_proto(latest_widget_states)
self._call_callbacks()
Expand Down

0 comments on commit 893c9cc

Please sign in to comment.