【问题标题】:Is there a way to search by column with Shiny's updated DT::renderDataTable and DT::dataTableOutput?有没有办法使用 Shiny 更新的 DT::renderDataTable 和 DT::dataTableOutput 按列搜索?
【发布时间】:2015-08-28 00:56:36
【问题描述】:

Shiny 似乎改变了数据表的实现。这是什么原因?

除非我遗漏了什么,否则新的默认设置看起来像是倒退了一步。一方面,他们缺少表格底部的特定列搜索框。有没有办法替换该功能?

【问题讨论】:

    标签: r datatables shiny


    【解决方案1】:

    它当然仍然存在,只是似乎不再是默认设置了。

    library(shiny)
    runApp(shinyApp(
      ui = fluidPage(
        DT::dataTableOutput("table")
      ),
      server = function(input, output, session) {
        output$table <- DT::renderDataTable(cars, filter = "top")
      }
    ))
    

    我刚刚去了https://rstudio.github.io/DT/ 的网站文档获取数据表,在首页他们说如何使用filter 参数

    确保您使用的是 Shiny 和 DT 的最新版本(使用 GitHub 版本,因为在过去 2 周内完成了很多工作)

    【讨论】:

      猜你喜欢
      • 2018-08-07
      • 1970-01-01
      • 2021-01-03
      • 2018-10-08
      • 2020-09-18
      • 2016-01-02
      • 2015-11-02
      • 2015-09-13
      • 2018-10-07
      相关资源
      最近更新 更多