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