mabuseif commited on
Commit
7563ab8
·
verified ·
1 Parent(s): fd1d30e

Update app/components.py

Browse files
Files changed (1) hide show
  1. app/components.py +3 -3
app/components.py CHANGED
@@ -258,7 +258,7 @@ def display_component_tab(comp_type: str):
258
  submit = st.form_submit_button(f"{submit_label} {comp_singular}")
259
 
260
  with col2:
261
- cancel = st.form_submit_button("Refresh")
262
 
263
  # Handle form submission
264
  if submit:
@@ -318,10 +318,10 @@ def display_component_tab(comp_type: str):
318
  st.session_state[action_key] = {"action": "save", "id": str(uuid.uuid4())}
319
  st.session_state.components_rerun_pending = True
320
 
321
- elif cancel:
322
  # Clear editor state
323
  st.session_state[editor_key] = {}
324
- st.session_state[action_key] = {"action": "cancel", "id": str(uuid.uuid4())}
325
  st.session_state.components_rerun_pending = True
326
 
327
  def display_wall_window_table(comp_type: str, components: List[Dict[str, Any]]):
 
258
  submit = st.form_submit_button(f"{submit_label} {comp_singular}")
259
 
260
  with col2:
261
+ refresh = st.form_submit_button("Refresh")
262
 
263
  # Handle form submission
264
  if submit:
 
318
  st.session_state[action_key] = {"action": "save", "id": str(uuid.uuid4())}
319
  st.session_state.components_rerun_pending = True
320
 
321
+ elif refresh:
322
  # Clear editor state
323
  st.session_state[editor_key] = {}
324
+ st.session_state[action_key] = {"action": "refresh", "id": str(uuid.uuid4())}
325
  st.session_state.components_rerun_pending = True
326
 
327
  def display_wall_window_table(comp_type: str, components: List[Dict[str, Any]]):