简体   繁体   中英

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. After upgrading DT package this functions does not work. 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.

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?

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. Chapter 2.2 DataTables Information refers to input$tableId_rows_all to get all the rowas after filtering.

But take a look at this blog post about the release of the new version of DT, especially this part:

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. 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.

The blog post is here

Hope this helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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