有没有办法使用 Shiny 更新后的 DT::renderDataTable 和 DT::dataTableOutput 按列搜索?

Is there a way to search by column with Shiny's updated DT::renderDataTable and DT::dataTableOutput?

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

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

它肯定仍然存在,只是似乎不再是默认值了。

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 周内完成了大量工作)