Spaces:
Running
Running
Update app2.py
Browse files
app2.py
CHANGED
|
@@ -31,9 +31,6 @@ button3 = pn.widgets.Button(icon='settings', icon_size='1.5em', name='Settings',
|
|
| 31 |
# Create binary slider buttons for the sidebar
|
| 32 |
toggle_button = pn.widgets.Toggle(name="Filter", on_text="filter1", off_text="filter2", width=140)
|
| 33 |
|
| 34 |
-
# Create a Markdown pane to display the current filter name
|
| 35 |
-
filter_name = pn.pane.Markdown(toggle_button.on_text)
|
| 36 |
-
|
| 37 |
# Create a callback to update the filter name when the button is toggled
|
| 38 |
def update_filter_name(event):
|
| 39 |
filter_name.object = toggle_button.on_text
|
|
@@ -43,7 +40,7 @@ toggle_button.param.watch(update_filter_name, 'value')
|
|
| 43 |
# Create a column layout for the buttons inside the toggleable sidebar
|
| 44 |
buttons = pn.Column(
|
| 45 |
button1, button2, button3,
|
| 46 |
-
|
| 47 |
css_classes=['hidden']
|
| 48 |
)
|
| 49 |
|
|
|
|
| 31 |
# Create binary slider buttons for the sidebar
|
| 32 |
toggle_button = pn.widgets.Toggle(name="Filter", on_text="filter1", off_text="filter2", width=140)
|
| 33 |
|
|
|
|
|
|
|
|
|
|
| 34 |
# Create a callback to update the filter name when the button is toggled
|
| 35 |
def update_filter_name(event):
|
| 36 |
filter_name.object = toggle_button.on_text
|
|
|
|
| 40 |
# Create a column layout for the buttons inside the toggleable sidebar
|
| 41 |
buttons = pn.Column(
|
| 42 |
button1, button2, button3,
|
| 43 |
+
toggle_button,
|
| 44 |
css_classes=['hidden']
|
| 45 |
)
|
| 46 |
|