Hello. I have a Shiny app with a download button. Everything works fine, but if I add a reactive object to the downloadHandler (example code below), the button icon disappears and the button collapses (no text visible) upon page load. I suspect it has something to do with the reactive object "result()" I have in the download handler but I am not sure how to work around this because the file name and content is only set after a button click which fires eventReactive and creates "result()".
output$download_gt_table <- downloadHandler(
# NOTE: result() is a list object created in a eventReactive() function. It has properties: down_file and
#tmp_file)
filename = result()$down_file,
content = function(file) {
tmp_file <- result()$tmp_file
file.copy(tmp_file, file)
}
)
Any help much appreciated!