bs4Dash icon indicating copy to clipboard operation
bs4Dash copied to clipboard

href in menuItem does not work

Open renejuan opened this issue 3 years ago • 2 comments

Not sure if this is supposed to work but if you create a menuItem or subMenuItem with an href; clicking in the item does not take you to the URL---it have no effect. I am not entirely sure but I think the problem is related to the data-toggle="tab" attribute. See reprex below.

if (interactive()) {
  library(shiny)
  library(bs4Dash)
  
  # A dashboard header with 3 dropdown menus
  header <- dashboardHeader(
    title = "My dashboard"
  )
  
  sidebar <- dashboardSidebar(
    sidebarMenu(
      menuItem("My menu L1", href = "https://rinterface.github.io/bs4Dash/", newTab = FALSE),
      menuItem("My menu L2",
        menuSubItem("My submenu 1", href = "https://rinterface.github.io/bs4Dash/", newTab = TRUE)
      )
    )
  )
  
  shinyApp(
    ui = dashboardPage(
      header,
      sidebar,
      dashboardBody()
    ),
    server = function(input, output) { }
  )
}

renejuan avatar Jul 24 '21 02:07 renejuan

FYI, I cloned the project and modify the function bs4SidebarMenuItem to comment out # data-toggle = "tab" and it works. I am not too familiar with bootstrap so not sure what the value should be but I wanted to let you know I confirm there seems to be some kind of conflict. Thanks.

renejuan avatar Jul 24 '21 03:07 renejuan

Fixed in dev branch

DivadNojnarg avatar Aug 13 '22 07:08 DivadNojnarg