Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

sidebar-mini is overlayed by navbarPage in R shiny

$
0
0

I'm trying to add a navbarPage and use a slidebar-mini class, however when the sidebar is minimized the menu item text are under navbarpage items, which is not correct. any idea how one can bring the items on top of the navbarpage menu ?

## 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)

Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>