James McCool commited on
Commit
e354cc6
·
1 Parent(s): a700b26

Update segmented control in app.py to include width property for improved layout and consistency in tab selection between 'Data Load' and 'Manage Portfolio'.

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -71,15 +71,6 @@ st.markdown("""
71
 
72
  </style>""", unsafe_allow_html=True)
73
 
74
- selected_tab = st.segmented_control(
75
- "Select Tab",
76
- options=["Data Load", "Manage Portfolio"],
77
- selection_mode='single',
78
- default='Data Load',
79
- label_visibility='collapsed',
80
- key='tab_selector'
81
- )
82
-
83
  def create_position_export_dict(column_name, csv_file, site_var, type_var, sport_var):
84
  try:
85
  # Remove any numbers from the column name to get the position
@@ -189,6 +180,16 @@ with st.container():
189
  elif type_var == 'Showdown':
190
  salary_max = 60000
191
 
 
 
 
 
 
 
 
 
 
 
192
  if selected_tab == 'Data Load':
193
  if st.button('Clear data', key='reset1'):
194
  st.session_state.clear()
 
71
 
72
  </style>""", unsafe_allow_html=True)
73
 
 
 
 
 
 
 
 
 
 
74
  def create_position_export_dict(column_name, csv_file, site_var, type_var, sport_var):
75
  try:
76
  # Remove any numbers from the column name to get the position
 
180
  elif type_var == 'Showdown':
181
  salary_max = 60000
182
 
183
+ selected_tab = st.segmented_control(
184
+ "Select Tab",
185
+ options=["Data Load", "Manage Portfolio"],
186
+ selection_mode='single',
187
+ default='Data Load',
188
+ label_visibility='collapsed',
189
+ width='stretch',
190
+ key='tab_selector'
191
+ )
192
+
193
  if selected_tab == 'Data Load':
194
  if st.button('Clear data', key='reset1'):
195
  st.session_state.clear()