diff --git a/R/bsMenuItem.R b/R/bsMenuItem.R index 001d4c3..3f5a1cc 100644 --- a/R/bsMenuItem.R +++ b/R/bsMenuItem.R @@ -82,7 +82,7 @@ bsMenuItem <- function(inputId, label, type = "command", value = NULL, icon = NU i <- tagAddClass(i, icon) } - item <- tags$li(id = inputId, class = "sbs-menu-item", "data-menu-type" = type, tags$a(href = "#", i, label)) + item <- tags$li(id = inputId, class = "sbs-menu-item", "data-menu-type" = type, tags$a(href = "#", onclick="return false;", i, label)) if(type != "command") item <- tagAddAttribs(item, "data-menu-checked" = checked) if(!is.null(value)) item <- tagAddAttribs(item, "data-menu-value" = value) @@ -119,4 +119,4 @@ updateMenuItem <- function(session, inputId, label = NULL, icon = NULL, #'@export clickMenuItem <- function(session, inputId) { session$sendInputMessage(inputId, list(click = TRUE)) -} \ No newline at end of file +}