Мне нужно иметь фиксированную боковую панель, но у меня возникают проблемы при добавлении style = 'position: fixed;'
.Когда я добавляю стиль, боковая панель панели сжимается.Код (с style = 'position: fixed;'
) ниже.На рисунке показан результат без и с style = 'position: fixed;'
Как сделать так, чтобы sibarPanel не сжимался?
# User interface
ui <- fluidPage(
sidebarLayout(
sidebarPanel(width = 2,
style='position: fixed;',
uiOutput("countryList")),
mainPanel(
plotOutput("distPlot1"),
plotOutput("distPlot2"),
plotOutput("distPlot3"))))
# Server logic
server <- function(input, output) {
output$countryList <- renderUI({
selectizeInput("countryName", "Country",
choices = c('Austria', 'The United Kingdom'))})
output$distPlot1 <- renderPlot({hist(rnorm(100))})
output$distPlot2 <- renderPlot({hist(rnorm(200))})
output$distPlot3 <- renderPlot({hist(rnorm(300))})}
shinyApp(ui, server)
style = 'position: fixed;'">