Open philippleppert opened 10 months ago
Thanks for the report! This is most likely to be due to DT using an older version of selectize.js but shiny using a much newer version. I'm not sure if upgrading selectize.js in DT would fix the issue. Upgrading a JS library from 9 years ago may not be a trivial task...
Thank You for pointing this out @yihui! I just realized that there was an error logged to my browser's console...
This error now led my to this issue in the shiny package, which was ultimately resolved by upgrading selectize.js
. https://github.com/rstudio/shiny/issues/3125
Placing the HTML dependencies of selectizeInput() into the UI is also a possible workaround for this issue.
ui <- fluidPage(
htmltools::findDependencies(selectizeInput("foo", "bar", choices = "a")),
actionButton("modal_pop1", "show modal with selectizeInput"),
actionButton("modal_pop2", "show modal with datatable with column filter")
)
Thanks for posting the workaround!
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.
Hello everybody,
I have a shiny app in which one modal contains different control widgets like
selectizeInput
. A second modal contains a datatable with column filters. When I first open the modal with the datatable (with column filters) and then switch to the modal with the control widgets, the class of theselectizeInput
is somehow altered. You can see this for example in Chrome, where the dropdown list now has a very basic appearance. But then again, I am also not able to capture the input's value viainput$
any longer.This does not happen if:
selectizeInput
outside both modals or in the modal with the datatableI am using
DT_0.29
andshiny_1.7.5
. Edit: just installedDT_0.31
and the problem persists.Reprex is below:
Output of xfun::session_info('DT')