Mario M. Mario M. - 1 year ago 146
Javascript Question

R Shiny: conditionalPanel not working if used several widgets

Conditional pannel doesn't show the message "Loading..." in my shiny app. Message must appear when all widgets have been pressed.

textInput("id1", "Write word 1:"),
textInput("id2", "Write word 2:"),
selectInput("line", "Select:",
label = "Select a date range:", start = as.character(Sys.Date()-1), end = as.character(Sys.Date()),
actionButton("update", "OK"),
p("Press OK to update inputs"),
conditionalPanel(condition="input.id1>0 && input.id2>0 && input.line>0 && input.dateRange>0 && input.update>0",

I think the condition is wrong.

Answer Source

Problem with compare numeric and character in js

You need to use 0 only for numerict results ( actionButton and selectInput in your example)

You need such condition input.id1>'' && input.id2>'' && input.line>0&& input.dateRange>'' && input.update>0

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download