How to prevent automatic rerun on user interaction with sac.tree() component in Streamlit?

Hi everyone,

I’m using the sac.tree() component (from streamlit-antd-components) to display an interactive tree in my Streamlit app. The problem is, every time a user clicks or selects a tree item, the entire app automatically reruns due to Streamlit’s reactive model. This causes some undesired side effects like resetting certain UI states or refreshing data unnecessarily.

I understand that Streamlit widgets generally trigger reruns on interaction, but is there a way to disable or control this automatic rerun behavior specifically for the tree widget?

Or is there a recommended pattern to handle user interactions with sac.tree() without causing full app reruns on every click? For example, delaying reruns until a button is pressed or controlling state more granularly?

import streamlit_antd_components as sac
selected_item = sac.tree(tree_items, open_all=True if XXX else False, key='hierarchy_tree')

Even, I tried tree_select package,

from streamlit_tree_select import tree_select
selected_node = tree_select(df_tree, key="hierarchy_tree_using_tree_select")

Any insights, workarounds, or best practices would be greatly appreciated!
Thanks in advance.