Shiny splitLayout and selectInput issue
Here is a potential fix. It appears that the parent div
of the dropdown menu has an overflow: auto
style, which blocks the dropdown menu. Changing to visible
fixes it.
library(shiny)
server <- function(input, session, output) {
output$select_1 <- renderUI({
selectInput("select_input","select", choices = LETTERS)
})
}
ui <- fluidPage(
splitLayout(
uiOutput("select_1"),
tags$head(tags$style(HTML("
.shiny-split-layout > div {
overflow: visible;
}
")))
)
)
shinyApp(ui = ui, server = server)
I tried the solution of @Xiongbing Jin, but that didn't fully resolve the issue for me, but pushed my to this solution:
# in ui.R
splitLayout(
tags$head(tags$style(HTML(".shiny-split-layout > div {overflow: visible;}"))),
cellWidths = c("0%","50%", "50%"), # note the 0% here at position zero...
selectInput("A", label = "A LBL",),
selectInput("B", label = "B LBL")
)