-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Control bar not showing top elements when collapsed == FALSE #47
Comments
Do you mean something like this? library(shiny)
library(bs4Dash)
shiny::shinyApp(
ui = dashboardPage(
controlbar_collapsed = FALSE,
navbar = dashboardHeader(
rightUi = bs4DropdownMenu(
show = TRUE,
labelText = "!",
status = "danger",
src = "http://www.google.fr",
bs4DropdownMenuItem(
text = "message 1",
date = "today"
),
bs4DropdownMenuItem(
text = "message 2",
date = "yesterday"
)
)
),
sidebar = dashboardSidebar(),
body = dashboardBody(),
controlbar = dashboardControlbar(
skin = "light",
controlbarMenu(
side = "left",
id = "tabsetpanel",
controlbarItem(
tabName = "Tab 1",
br(),
sliderInput(
"obs",
"Number of observations:",
min = 0,
max = 1000,
value = 500
)
),
controlbarItem(
tabName = "Tab 2",
br(),
checkboxGroupInput(
"variable",
"Variables to show:",
c("Cylinders" = "cyl",
"Transmission" = "am",
"Gears" = "gear")
)
),
controlbarItem(
tabName = "Tab 3",
br(),
selectInput(
"state",
"Choose a state:",
list(`East Coast` = list("NY", "NJ", "CT"),
`West Coast` = list("WA", "OR", "CA"),
`Midwest` = list("MN", "WI", "IA")
)
)
)
)
)
),
server = function(input, output) {
output$distPlot <- renderPlot({
hist(rnorm(input$obs))
})
output$data <- renderTable({
head(mtcars[, c("mpg", input$variable), drop = FALSE])
}, rownames = TRUE)
output$result <- renderText({
paste("You chose", input$state)
})
}
) It works for me. Maybe you can send me an example or a screenshot. |
Here is a minimal example. Sorry I didn't include at the onset. If you remove the But with the style argument in there, it does not render correctly unless you close the controlbar and reopen it. In fact, as soon as you click the "close control bar" icon, it renders correctly before the control bar closes.
|
This is due to the class layout-fixed in the body element. It somehow messes up with the controlbar. |
When a control bar is created and
controlbar_collapsed = FALSE
, then the control bar is created and the top elements are not visible. If the control bar is collapsed and then un-collapsed, the elements appear.It appears that the elements are hidden underneath the navbar until re-displayed.
using 0.4.0.9000
The text was updated successfully, but these errors were encountered: