In the shiny
app below Im trying to set the column width based on the shiny
widget but I get column width must be between 1 and 12
## app.R ##
library(shiny)
library(shinydashboard)
library(shinyWidgets)
library(DT)
ui <- dashboardPage(
dashboardHeader(title = "VMT-Mobility"),
dashboardSidebar(
),
dashboardBody(
fluidRow(
column(3,
pickerInput(
inputId = "cat",
label = "Select categories",
choices = c("1st","2nd"),
selected="1st",
multiple = F,
)
)
),
fluidRow(
column(uiOutput("n1"),box()),
column(uiOutput("n2"),box())
)
)
)
server <- function(input, output) {
output$n1<-renderUI({
if(input$cat=="1st"){
9
}
else{
3
}
})
output$n2<-renderUI({
if(input$cat=="1st"){
3
}
else{
9
}
})
}
shinyApp(ui, server)