Note that there are some explanatory texts on larger screens.

plurals
  1. POShiny reactiveUI hangs with multiple uiOutput calls on same condition variable
    primarykey
    data
    text
    <p>I am trying to make a reactive UI with sliders that drop in and out via a dropdown in shiny. I have a server with reactiveUI sliders (server.R):</p> <pre><code>library(shiny) shinyServer(function(input, output) { output$slider1 &lt;- reactiveUI(function() { sliderInput("s1", "slide 1", min = 1, max = 100, value = 1) }) output$slider2 &lt;- reactiveUI(function() { sliderInput("s2", "slide 2", min = 1, max = 100, value = 1) }) }) </code></pre> <p>I can run the server fine with the following code (ui.R): </p> <pre><code>library(shiny) shinyUI(pageWithSidebar( headerPanel("Hello Shiny!"), sidebarPanel( selectInput("dataset", "number of buckets:", choices = c(1,2,3)), conditionalPanel( condition = "input.dataset==2", uiOutput("slider1"),uiOutput("slider2")), conditionalPanel( condition = "input.dataset==1", sliderInput("s1", "slide 1", min = 1, max = 100, value = 1) ) ), mainPanel( ) )) </code></pre> <p>but if I try to make both conditionalPanels call uiOutput, the server freezes: </p> <pre><code>library(shiny) shinyUI(pageWithSidebar( headerPanel("Hello Shiny!"), sidebarPanel( selectInput("dataset", "number of buckets:", choices = c(1,2,3)), conditionalPanel( condition = "input.dataset==2", uiOutput("slider1"),uiOutput("slider2")), conditionalPanel( condition = "input.dataset==1", uiOutput("slider1") ) ), mainPanel( ) )) </code></pre> <p>I have played around with this, and found that it happens anytime that use the same condition variable and multiple uiOutput calls. Any suggestions? Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload