Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,16 +45,15 @@ def add_to_header(event):
|
|
| 45 |
if selected_options:
|
| 46 |
buttons_to_add.extend(selected_options) # Extend the list with selected options
|
| 47 |
filter_list.value = [] # Clear the selected options after adding them to the list
|
| 48 |
-
update_header()
|
| 49 |
|
| 50 |
add_to_header_button.on_click(add_to_header)
|
| 51 |
|
| 52 |
# Function to update the header layout with the newly created buttons
|
| 53 |
def update_header():
|
| 54 |
-
header_buttons.clear() # Clear the existing buttons
|
| 55 |
for button_name in buttons_to_add:
|
| 56 |
new_button = pn.widgets.Button(name=button_name, width=130, sizing_mode='fixed')
|
| 57 |
-
header_buttons.append(new_button)
|
| 58 |
|
| 59 |
# Layout using Template
|
| 60 |
template = pn.template.FastListTemplate(
|
|
|
|
| 45 |
if selected_options:
|
| 46 |
buttons_to_add.extend(selected_options) # Extend the list with selected options
|
| 47 |
filter_list.value = [] # Clear the selected options after adding them to the list
|
|
|
|
| 48 |
|
| 49 |
add_to_header_button.on_click(add_to_header)
|
| 50 |
|
| 51 |
# Function to update the header layout with the newly created buttons
|
| 52 |
def update_header():
|
| 53 |
+
# header_buttons.clear() # Clear the existing buttons
|
| 54 |
for button_name in buttons_to_add:
|
| 55 |
new_button = pn.widgets.Button(name=button_name, width=130, sizing_mode='fixed')
|
| 56 |
+
# header_buttons.append(new_button)
|
| 57 |
|
| 58 |
# Layout using Template
|
| 59 |
template = pn.template.FastListTemplate(
|