|
1 | | -dataTableDependency <- list( |
2 | | - htmlDependency( |
3 | | - "datatables", "1.10.2", |
4 | | - c(file = system.file("www/datatables", package = "shinybootstrap2")), |
5 | | - script = "js/jquery.dataTables.min.js" |
6 | | - ), |
7 | | - htmlDependency( |
8 | | - "datatables-bootstrap", "1.10.2", |
9 | | - c(file = system.file("www/datatables", package = "shinybootstrap2")), |
10 | | - stylesheet = c("css/dataTables.bootstrap.css", "css/dataTables.extra.css"), |
11 | | - script = "js/dataTables.bootstrap.js" |
| 1 | +dataTableDependency <- function() { |
| 2 | + list( |
| 3 | + htmlDependency( |
| 4 | + "datatables", "1.10.2", |
| 5 | + c(file = system.file("www/datatables", package = "shinybootstrap2")), |
| 6 | + script = "js/jquery.dataTables.min.js" |
| 7 | + ), |
| 8 | + htmlDependency( |
| 9 | + "datatables-bootstrap", "1.10.2", |
| 10 | + c(file = system.file("www/datatables", package = "shinybootstrap2")), |
| 11 | + stylesheet = c("css/dataTables.bootstrap.css", "css/dataTables.extra.css"), |
| 12 | + script = "js/dataTables.bootstrap.js" |
| 13 | + ) |
12 | 14 | ) |
13 | | -) |
| 15 | +} |
14 | 16 |
|
15 | 17 | #' Create a table output element |
16 | 18 | #' |
@@ -38,6 +40,6 @@ dataTableDependency <- list( |
38 | 40 | dataTableOutput <- function(outputId) { |
39 | 41 | attachDependencies( |
40 | 42 | div(id = outputId, class="shiny-datatable-output"), |
41 | | - dataTableDependency |
| 43 | + dataTableDependency() |
42 | 44 | ) |
43 | 45 | } |
0 commit comments