jskinner215 commited on
Commit
44a3325
·
1 Parent(s): d9d8ffb

Update ui_utils.py

Browse files
Files changed (1) hide show
  1. ui_utils.py +8 -1
ui_utils.py CHANGED
@@ -24,7 +24,14 @@ def display_class_dropdown(client):
24
  elif st.session_state.query_flow:
25
  existing_classes = [cls["class"] for cls in client.schema.get()["classes"]]
26
  class_options = existing_classes + ["Query all data"]
27
- return st.selectbox("Select a class or query all data:", class_options, key="class_selector_query")
 
 
 
 
 
 
 
28
 
29
  def handle_new_class_selection(client, selected_class):
30
  if selected_class == "New Class":
 
24
  elif st.session_state.query_flow:
25
  existing_classes = [cls["class"] for cls in client.schema.get()["classes"]]
26
  class_options = existing_classes + ["Query all data"]
27
+ selected_option = st.selectbox("Select a class or query all data:", class_options, key="class_selector_query")
28
+ if selected_option == "Query all data":
29
+ # If "Query all data" is selected, return the first class as a default for now
30
+ # You can modify this behavior as needed
31
+ return existing_classes[0]
32
+ else:
33
+ return selected_option
34
+
35
 
36
  def handle_new_class_selection(client, selected_class):
37
  if selected_class == "New Class":