File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
streamlit_components/refresh Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11from typing import cast
22
33import streamlit as st
4+ from streamlit_components .refresh import initialize_refresh_component
45
56from nipanel ._streamlit_panel_value_accessor import StreamlitPanelValueAccessor
6- from nipanel .panel_refresh import add_refresh_component
77
88PANEL_ACCESSOR_KEY = "StreamlitPanelValueAccessor"
99
@@ -23,7 +23,7 @@ def initialize_panel() -> StreamlitPanelValueAccessor:
2323 st .session_state [PANEL_ACCESSOR_KEY ] = _initialize_panel_from_base_path ()
2424
2525 panel = cast (StreamlitPanelValueAccessor , st .session_state [PANEL_ACCESSOR_KEY ])
26- refresh_component = add_refresh_component (panel .panel_id )
26+ refresh_component = initialize_refresh_component (panel .panel_id )
2727 refresh_component ()
2828 return panel
2929
Original file line number Diff line number Diff line change 77from nipanel ._streamlit_constants import STREAMLIT_REFRESH_COMPONENT_URL
88
99
10- def add_refresh_component (panel_id : str ) -> Any :
10+ def initialize_refresh_component (panel_id : str ) -> Any :
1111 """Add a refresh component to the Streamlit app."""
12- refresh_component = components .declare_component (
12+ _refresh_component_func = components .declare_component (
1313 "panelRefreshComponent" ,
1414 url = f"{ STREAMLIT_REFRESH_COMPONENT_URL } /{ panel_id } " ,
1515 )
1616
17- return refresh_component
17+ return _refresh_component_func
You canβt perform that action at this time.
0 commit comments