File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 1- from  streamlit .components .v1  import  components 
21from  typing  import  cast 
32
43import  streamlit  as  st 
54
65from  nipanel ._streamlit_panel_value_accessor  import  StreamlitPanelValueAccessor 
7- from  nipanel ._streamlit_constants  import  STREAMLIT_REFRESH_COMPONENT_URL 
86from  nipanel .panel_refresh  import  add_refresh_component 
97
108PANEL_ACCESSOR_KEY  =  "StreamlitPanelValueAccessor" 
Original file line number Diff line number Diff line change @@ -42,4 +42,4 @@ def __init__(
4242            discovery_client = discovery_client ,
4343            grpc_channel_pool = grpc_channel_pool ,
4444            grpc_channel = grpc_channel ,
45-         )
45+         )
Original file line number Diff line number Diff line change 1- """ Panel refresh component for Streamlit. """ 
1+ """Panel refresh component for Streamlit.""" 
2+ 
3+ from  typing  import  Any 
24
35import  streamlit .components .v1  as  components 
6+ 
47from  nipanel ._streamlit_constants  import  STREAMLIT_REFRESH_COMPONENT_URL 
58
6- def  add_refresh_component (panel_id ):
79
10+ def  add_refresh_component (panel_id : str ) ->  Any :
11+     """Add a refresh component to the Streamlit app.""" 
812    refresh_component  =  components .declare_component (
913        "panelRefreshComponent" ,
1014        url = f"{ STREAMLIT_REFRESH_COMPONENT_URL }  /{ panel_id }  " ,
11-         key = f"panel_refresh_{ panel_id }  " ,
1215    )
1316
1417    return  refresh_component 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You canβt perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments