This is my code:
library(shiny)
ui <- fluidPage(
data<- iris[1,] %>% mutate(download = 1),
reactable(data,
columns = list(
download = colDef(cell = icon_assign(data, icon = "download"))))
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
How can I make this table downloadable by clicking on the download
icon ?
You need to have some stuff in your server function. Below is a template you can take from. Main takeaways: download button in ui, add server info for the download button