You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that if datatable is created outside Shiny environment, selection is completely ignored, thanks to inShiny() call. I'm wondering what is the motivation behind this, because I was a bit surprised by this. In particular in the following example I would expect default selection mode to be working, but it's not.
I don't see any specific reason why it is so, and I feel that sometimes it could be useful (for the record - I don't have real use case, I noticed it by accident while experimenting with some other features). Ot maybe you are not supposed to use it like that?
I have provided the necessary information about my issue.
If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('DT'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/DT').
If I have posted the same issue elsewhere, I have also mentioned it in this issue.
I have learned the Github Markdown syntax, and formatted my issue correctly.
I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered:
You can set options(DT.datatable.shiny = TRUE to bypass the inShiny() check.
I think the original rationale was that you can't do anything meaningful with the selections without Shiny (or crosstalk). The only possible use case I can think of is to highlight certain parts of a table.
The example you provided is indeed surprising. Our inShiny() check may be too strict. I'll soften it in a minute. Thanks!
… really inside a Shiny app
e.g., a datatable() may be created outside shinyApp() but used in shinyApp() later, in which case we should enable selection
I've noticed that if
datatable
is created outside Shiny environment,selection
is completely ignored, thanks toinShiny()
call. I'm wondering what is the motivation behind this, because I was a bit surprised by this. In particular in the following example I would expect default selection mode to be working, but it's not.I don't see any specific reason why it is so, and I feel that sometimes it could be useful (for the record - I don't have real use case, I noticed it by accident while experimenting with some other features). Ot maybe you are not supposed to use it like that?
Session info
By filing an issue to this repo, I promise that
xfun::session_info('DT')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/DT')
.I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered: