Spaces:
Running
Running
Update app2.py
Browse files
app2.py
CHANGED
|
@@ -105,11 +105,10 @@ def show_previous_content(event):
|
|
| 105 |
if event.obj.name in previous_content:
|
| 106 |
main_body_instance.main_body.clear() # Clear the existing main panel content
|
| 107 |
main_body_instance.main_body.extend(previous_content[event.obj.name]) # Add the previous content
|
| 108 |
-
main_body_instance.param.trigger('main_body') # Trigger the update manually
|
| 109 |
else:
|
| 110 |
main_body_instance.main_body.clear() # Clear the existing main panel content
|
| 111 |
main_body_instance.main_body.append(pn.pane.Markdown("No previous content available!"))
|
| 112 |
-
|
| 113 |
|
| 114 |
# Attach the show_previous_content function to the on_click event of button1 and button3
|
| 115 |
button1.on_click(show_previous_content)
|
|
|
|
| 105 |
if event.obj.name in previous_content:
|
| 106 |
main_body_instance.main_body.clear() # Clear the existing main panel content
|
| 107 |
main_body_instance.main_body.extend(previous_content[event.obj.name]) # Add the previous content
|
|
|
|
| 108 |
else:
|
| 109 |
main_body_instance.main_body.clear() # Clear the existing main panel content
|
| 110 |
main_body_instance.main_body.append(pn.pane.Markdown("No previous content available!"))
|
| 111 |
+
main_body_instance.param.trigger('main_body') # Trigger the update manually
|
| 112 |
|
| 113 |
# Attach the show_previous_content function to the on_click event of button1 and button3
|
| 114 |
button1.on_click(show_previous_content)
|