Reputation: 4274
I am trying to use the TableTools extension for DataTables to get a toolbar with copy, save, print and other options above a table in my Shiny App.
This is my server.R:
output$table <- DT::renderDataTable({
DT::datatable(datasetInput(),extensions = 'TableTools',options = list(
"sDom" = 'T<"clear">lfrtip',
"oTableTools" = list(
"sSwfPath" = "//cdnjs.cloudflare.com/ajax/libs/datatables-tabletools/2.1.5/swf/copy_csv_xls.swf",
"aButtons" = list(
"copy",
"print",
list("sExtends" = "collection",
"sButtonText" = "Save",
"aButtons" = c("csv","xls")
))
)
))
})
This is the output:
As you can see, there is no copy button. Also, when I click on the Save button, a tiny bar appears below it and the screen goes gray but nothing happens next.
This only happens when I try to run the app using Run in Window
(R Studio). If I run it as External
in Chrome, then there are no issues. Any help would be much appreciated. Thanks!
Upvotes: 0
Views: 491