[英]Is there a way to search by column with Shiny's updated DT::renderDataTable and DT::dataTableOutput?
Shiny seems to have changed the implementation of data tables. Shiny似乎改变了数据表的实现。 What was the reason for this?
这是什么原因?
Unless I'm missing something, the new default looks like a step backwards. 除非我遗漏了某些东西,否则新默认值似乎是向后退一步。 For one thing, they are missing the column-specific search boxes at the bottom of the table.
首先,他们缺少表格底部的特定于列的搜索框。 Is there a way to replace that functionality?
有没有办法取代这个功能?
It certainly still exists, it just seems to not be the default anymore. 它当然仍然存在,它似乎不再是默认值。
library(shiny)
runApp(shinyApp(
ui = fluidPage(
DT::dataTableOutput("table")
),
server = function(input, output, session) {
output$table <- DT::renderDataTable(cars, filter = "top")
}
))
I just went to the website docs for datatable at https://rstudio.github.io/DT/ and on the front page they say how to use the filter
parameter 我刚刚访问了https://rstudio.github.io/DT/上的数据表网站文档,并在首页上说明了如何使用
filter
参数
Make sure you're using the most up to date version of both shiny and DT (use the GitHub version because a lot of work was done in the past 2 weeks) 确保您使用的是最新版本的闪亮和DT(使用GitHub版本,因为在过去的两周内完成了大量工作)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.