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
In a Shiny app with a DT table that uses filter argument and a modal containing a selectInput, a console error referencing 'selectize-plugin-a11y' appears if the table is rendered first and then the modal is opened. This error also breaks the server, preventing the modal from being closed.
However, if the DT is inside the modal and the 'selectInput' is outside, no error occurs, suggesting that the rendering order triggers the plugin problem.
shinyapp.ts:456Error:Unabletofind"selectize-plugin-a11y"pluginat a.loadPlugin (<anonymous>:2:4581)
at a.require (<anonymous>:2:4888)
at a.initializePlugins (<anonymous>:2:4450)
atnew L (<anonymous>:2:10781)
atHTMLSelectElement.<anonymous> (<anonymous>:3:5531)
at Function.each (jquery.min.js:2:3003)
at S.each (jquery.min.js:2:1481)
at a.fn.selectize (<anonymous>:3:5249)
at t.value (selectInput.ts:278:25)
at t.value (selectInput.ts:233:12)
Notes:
The problem only occurs only when filter argument is set in DT.
Using selectize = FALSE prevents the issue.
The text was updated successfully, but these errors were encountered:
Thanks for opening a new issue @elaouniyassine. It turns out this was reported in rstudio/DT#1112. There's a workaround mentioned in that thread, to use
Thank you for the suggestion and for pointing me to the workaround.
I can confirm that using htmltools::findDependencies(selectizeInput("foo", "Foo", choices = NULL)) in the app UI works perfectly!
Previously, I was using a hidden selectInput in the UI to force the Shiny's selectize dependency to load before the DT's one, but this approach is much cleaner. I appreciate the help!
System details
Browser Version: Google Chrome, 131.0.6778.205
Output of
sessionInfo()
:Example application to reproduce the problem
Problem description
In a Shiny app with a DT table that uses
filter
argument and a modal containing aselectInput
, a console error referencing 'selectize-plugin-a11y' appears if the table is rendered first and then the modal is opened. This error also breaks the server, preventing the modal from being closed.However, if the DT is inside the modal and the 'selectInput' is outside, no error occurs, suggesting that the rendering order triggers the plugin problem.
Notes:
filter
argument is set in DT.selectize = FALSE
prevents the issue.The text was updated successfully, but these errors were encountered: