Shiny.setInputValue in modular app with namespaces

#1

I am able to use Shiny.setInputValue() in an app.R file with no issues to let Javascript modify inputs and trigger events back in R. However, if I have a modular application this has no effect on the inputs which are created within a namespace. Does anyone know how (or if) I can indicate on the call to Siny.setInputValue that the input is within a specific namespace? Hoping something like the namespace as a prefix to the variable or something simple such as this.

Thanks!

0 Likes

#2

To reference an input id via setInputValue in a modular app that uses namespaces, simply add the namespace id in front of the input id, separated by a dash. Example:

Shiny.setInputValue("the_namespace_id-serial","new value");  // Report the change to Shiny
0 Likes

closed #3

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

0 Likes