【发布时间】:2018-10-07 03:54:43
【问题描述】:
我正在尝试在我的 R Shiny 应用程序中添加分页、搜索框和选择器,但它现在不起作用(我尝试了分页 = TRUE 和搜索 = TRUE,在选项中,您可以在下面看到,但它没有不工作)。你知道我应该添加什么吗?
output$mytable1 <- DT::renderDataTable(
DT::datatable(
{ plots.dfs()[[1]] },
caption = htmltools::tags$caption(
style = 'caption-side: bottom; text-align: center;',
'Table 2: ', htmltools::em('This is a simple caption for the table.')
),
extensions = 'Buttons',
options = list(
paging = TRUE,
searching = TRUE,
fixedColumns = TRUE,
autoWidth = TRUE,
ordering = TRUE,
dom = 'tB',
buttons = c('copy', 'csv', 'excel')
),
class = "display"
))
我已经添加了我现在拥有的表格的屏幕截图,以及预期的表格。 感谢您的帮助]1
【问题讨论】: