bs4Dash
bs4Dash copied to clipboard
href in menuItem does not work
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) { }
)
}
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.
Fixed in dev branch