collapsed = TRUE does not work on shiny server. but it work on local R.
I use the same code. but on shiny server does not collapse.
shiny server:
local R:
########### in app.R ###################
########### ui ###################
library(shiny)
library(shinydashboard)
ui=function(request) {
dashboardPage(
dashboardHeader(title = "Basic dashboard"),
dashboardSidebar(collapsed = TRUE),
dashboardBody(
# Boxes need to be put in a row (or column)
fluidRow(
box(
title = "Controls",
sliderInput("slider", "Number of observations:", 1, 100, 50)
)
,box(plotOutput("plot1", height = 250)
)
)
))
}
###### server ###############################
server=function(input, output) {
set.seed(122)
histdata <- rnorm(500)
output$plot1 <- renderPlot({
data <- histdata[seq_len(input$slider)]
hist(data)
})
}
shinyApp(ui = ui, server = server)