-
Notifications
You must be signed in to change notification settings - Fork 114
Open
Description
Originally posted by @schloerke in #1810
Similarly, I can only hide the modal if it is programmatically shown.
What I'd like to have work: Shinylive App
from shiny.express import input, render, ui
from shiny import reactive
modal = ui.modal(ui.input_slider("n", "N", 0, 100, 20), footer = ui.input_action_button("close_btn", "Close modal"), easy_close=False)
modal
@reactive.effect
@reactive.event(input.close_btn)
def _():
print("Start remove modal")
ui.modal_remove()
print("End remove modal")What does work: Shinylive App
from shiny.express import input, render, ui
from shiny import reactive
modal = ui.modal(ui.input_slider("n", "N", 0, 100, 20), footer = ui.input_action_button("close_btn", "Close modal"), easy_close=False)
@reactive.effect
def _():
ui.modal_show(modal)
@reactive.effect
@reactive.event(input.close_btn)
def _():
print("Start remove modal")
ui.modal_remove()
print("End remove modal")If the modal is already open, why am I required to programmatically open it to close it.
Metadata
Metadata
Assignees
Labels
No labels