sidebarMenu input visual
hj1982 opened this issue · 1 comments
Hi,
Not sure if this is a bug, or me simply not fully understanding this, as I am switching from the original shinydasboard to bs4Das.
Side note: I got hooked after looking at a webinar where David showed bs4Das and after looking at https://dgranjon.shinyapps.io/bs4DashDemo/# (is the code viewable somewhere btw?)
I have created this sidebarMenu with conditionalPanel and I was testing putting in headers in between and this is how it looks (picture 1).
Also noticed, that when you toggle from dark to white this changes and ends different (pictures 2 and 3).
Code attached at the bottom.
Two minor questions as well if possible... 1) how to shut off or change the selection color from primary on the menuitems and 2) change the appearance of the fonts in the radiobuttons (not bold)?
Code:
ui <- dashboardPage(
dashboardHeader(title = "Basic dashboard"),
dashboardSidebar(
sidebarMenu(
id= "menu1",
# HTML("<br>"),
# h3(HTML("<b>Valmynd</b>"), style="text-align:center; color: white;"),
menuItem("menuItem 1", tabName = "tabName 1", icon=icon("cog")),
menuItem("menuItem 2", tabName = "tabName 2", icon=icon("cog"))
), #sidebarMenu
HTML("<hr>"),
h5("For a header"),
conditionalPanel(
condition = "input.menu1 == 'tabName 1'",
h5("For a header"),
selectInput(inputId = "Fyrst", label = NULL, choices = c("Single"), selected = "Married or living with someone"),
selectInput(inputId = "Second", label = "Label here", choices = c("Fyrst buyer", "Not fyrst buyer"), selected = "Fyrsti kaupandi"),
h5("For a header"),
radioButtons("radio1_medal", label = NULL, choices = list("Disposable income"=1, "Average price"=2, "Average price/disposable income"=3), selected=1)
),
conditionalPanel(
condition = "input.menu1 == 'tabName 2'",
selectInput(inputId = "Bla", label = "blabla", choices = c("Fyrst buyer", "Not fyrst buyer"), selected = "Fyrsti kaupandi"),
numericInput("Income", "Your income", value = 0 ),
)
), #dashboardSidebar
dashboardBody(
# Boxes need to be put in a row (or column)
)
)
server <- function(input, output) {
}
shinyApp(ui, server)