我正在尝试添加navbarPage并使用slidebar-mini类,但是,当最小化侧栏时,菜单项文本位于navbarpage项下,这是不正确的。知道如何将这些项目带到navbarpage菜单的顶部吗?
## app.R ##
library(shiny)
library(shinydashboard)
library(shinyjs)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(tags$script(
HTML("$('body').addClass('sidebar-mini ');")
),
sidebarMenu(
menuItem('Test', icon = icon('phone'), tabName = 'sampletabname')
)),
dashboardBody(useShinyjs() ,
tabItems(tabItem(
"sampletabname",
navbarPage(
title = div(icon("jsfiddle"), "test1 "),
tabPanel(
title = " test2" ,
value = "Connection",
icon = icon("database")
),
tabPanel(
title = " test3" ,
value = "Filtering",
icon = icon("filter")
)
)
)))
)
server <- function(input, output) {
}
shinyApp(ui, server)