简体   繁体   English

Shiny DT“rows_selected”和“rows_all”已弃用?

[英]Shiny DT “rows_selected” and “rows_all” are deprecated?

I developed a Shine app which uses " input$TABLE_NAME_rows_all " and " input$TABLE_NAME_rows_selected " intensively. 我开发了一个Shine应用程序,它使用“ input $ TABLE_NAME_rows_all ”和“ 输入$ TABLE_NAME_rows_selected ”。 After upgrading DT package this functions does not work. 升级DT包后,此功能不起作用。 I have checked DT documentation at https://rstudio.github.io/DT/shiny.html and seems that these had been deprecated, whith no clear replace for the "rows_all" option. 我已经在https://rstudio.github.io/DT/shiny.html检查了DT文档,似乎已经弃用了这些文档,但没有明确替换“rows_all”选项。

First question: is there any solution for this? 第一个问题:这有什么解决方案吗? Second question: (if first fails) can I run an app with a certain DT version and other apps in same server with the latest DT package? 第二个问题:(如果第一次失败)我可以使用最新的DT软件包在同一服务器上运行具有某个DT版本和其他应用程序的应用程序吗?

thanks 谢谢

From the link that you have provided it doesn't look like those functions have been depreciated. 从您提供的链接看起来,这些功能看起来并不折旧。 Chapter 2.1.1 refers to input$tableId_rows_selected to get the selected rows. 第2.1.1节引用输入$ tableId_rows_selected来获取所选行。 Chapter 2.2 DataTables Information refers to input$tableId_rows_all to get all the rowas after filtering. 第2.2章DataTables信息是指输入$ tableId_rows_all以获取过滤后的所有rowas。

But take a look at this blog post about the release of the new version of DT, especially this part: 但请看一下这篇关于DT新版本发布的博文,特别是这一部分:

For tables in the server-side processing mode (the default mode for tables in Shiny), the selected row indices are integers instead of characters (row names) now. 对于服务器端处理模式中的表(Shiny中表的默认模式),所选行索引现在是整数而不是字符(行名)。 This is for consistency with the client-side mode (which returns integer indices). 这是为了与客户端模式(返回整数索引)保持一致。 In many cases, it does not make much difference if you index an R object with integers or names, and we hope this will not be a breaking change to your Shiny apps. 在许多情况下,如果使用整数或名称索引R对象并没有多大区别,我们希望这不会对您的Shiny应用程序进行重大更改。

The blog post is here 博客文章在这里

Hope this helps 希望这可以帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM