Closed matthijsvanderloos closed 3 years ago
Thanks for reporting. I haven't had time yet to look into what's causing this, but this is technically out of scope so I'm not sure I'll prioritize it. hide/show/disable/reset/etc are meant to work with any native shiny input and anything that resembles shiny inputs as much as possible.
For this input specifically, looking at the code it seems that it deviates from normal shiny inputs by using tagList(tags$label, tags$input)
instead of div(tags$label, tags$input)
. It's possible that changing that to a div might resolve the issue.
Interesting, changing from tagList()
to div()
indeed seems to do the trick, thanks! Closing for now.
I have a
Shiny
app with a custom input control that useshtmltools::htmlDependency()
to load JavaScript and CSS dependencies. However, when the custom input is initially disabled usingshinyjs::disabled()
the dependencies fail to load.Below is a reproducible example based on a somewhat modified version of https://github.com/rstudio/shiny-examples/tree/master/035-custom-input-bindings. The main difference is the use of
htmltools::htmlDependency()
.app.R
:www/url-input-binding.js
:In the original version the JavaScript dependency
url-input-binding.js
is correcty loaded by the browser:However, after changing the line in the UI function that creates the custom input to:
the JavaScript dependency is not loaded anymore:
Not sure if this is a bug in
shinyjs
,htmltools
, or evenshiny
itself?