I have a shiny app where I want to download a csv version from the DT package. This used to work but most recently does not:
library(DT)
datatable(mtcars, extensions = 'Buttons', options = list(
initComplete = JS(
"function(settings, json) {",
"$(this.api().table().header()).css({'background-color': '#0894e5',
'color': '#000000'});",
"}"),
pageLength = 100,
dom = 'Bfrtip',
buttons =
list('copy', 'print', list(
extend = 'collection',
buttons = c('csv', 'excel', 'pdf'),
text = 'Download'
))
)
)
This is what the table looks like:
Then when I try to click download csv, it doesn't work:
Any ideas why?