I think that output should be displayed in Ui if you want to use it after conditionalPanel conditionalPanel .
In your example, the HTML for the conditional panel would look something like this:
<div data-display-if="output.disable_ui!=0">
If not a single element of your page (created as server-side outputs) has the identifier "disable_ui", then the condition "output.disable_ui! = 0" is always TRUE, and the conditional panel is always displayed.
A simple example:
shiny::runApp(list( ui = pageWithSidebar( headerPanel("test"), sidebarPanel( selectInput( "var", "Var", 0:9)), mainPanel( verbatimTextOutput("id"), conditionalPanel( condition="output.id!=0", h4('Visible') ) ) ), server = function(input, output) { output$id<-reactive({input$var}) } ))
If you select a number other than 0, a conditional panel is displayed. Now comment out the line verbatimTextOutput("id"), <div data-display-if="output.id!=0"> on this page there is no element with id, and then the conditionnal panel <div data-display-if="output.id!=0"> condition cannot be FALSE.
Julien navarre
source share