I have the shiny app below in which the user lands on the Upload data
panel. I want the user not to be able to move to any of the other 2 tabpanels
if he has not uploaded both files that are needed in the Upload data
tab.
library(shiny)
#ui.r
ui <- fluidPage(
# App title ----
titlePanel("Tabsets"),
# Sidebar layout with input and output definitions ----
sidebarLayout(
# Sidebar panel for inputs ----
sidebarPanel(
),
# Main panel for displaying outputs ----
mainPanel(
tabsetPanel( id="tabset",
tabPanel("Upload data", value="tab0",
fileInput("file1", "Choose CSV File",
multiple = TRUE,
accept = c("text/csv",
"text/comma-separated-values,text/plain",
".csv")),
fileInput("file2", "Choose CSV File",
multiple = TRUE,
accept = c("text/csv",
"text/comma-separated-values,text/plain",
".csv"))),
tabPanel("Resource Allocation", value="tab1"),
tabPanel("Time Series", value="tab2")
)
)
)
)
#server.r
server = function(input, output) {
}
shinyApp(ui, server)