I am trying to display a panel in shiny only when both files are uploaded.
shinyApp(
ui = fluidPage(
fileInput('fileInput_pd', 'Add the file'),
fileInput('fileInput_di', 'Add the file'),
conditionalPanel(
condition = "(input.fileInput_pd && input.fileInput_di) is true",
selectInput("smoothMethod", "Method",
list("lm", "glm", "gam", "loess", "rlm"))
),
downloadButton('report', 'Generate report')
),
server = function(input, output) {
observe({
if(is.null(input$fileInput_pd) | is.null(input$fileInput_di)) {
return()
} else {
var_example <- 2
}
}
)
}
)
With the code as above, it generates the conditionalPanel at the start. Any sugestions of what can I do?