-
Notifications
You must be signed in to change notification settings - Fork 114
Closed
Labels
Description
Related to #1724 and #1726 but in Express.
@express.render.download() doesn't accept an id argument and also doesn't include the parent module's ns in the download link. Therefore, all download buttons created with an Express module download the same file. Consider the MWE below
from shiny.express import module, render, ui
@module
def card_with_download(input, output, session, label):
with ui.card():
ui.card_header(f"download {label}")
@render.download(filename=f"test-{label}.txt", label=f"Download {label}")
def download():
yield f"Hi, we're in {label} file\n"
labels = list("ABCD")
for i, label in enumerate(labels):
card_with_download(f"download_{label}", label=label)Each of the buttons will download test-D.txt.