From ecb7a9114ff45499ae7b0c202c26dd371f813219 Mon Sep 17 00:00:00 2001 From: Chad Barraford Date: Fri, 15 Aug 2014 13:40:58 -0400 Subject: [PATCH] Update bsMenuItem.R return False to js when clicking on a menu item --- R/bsMenuItem.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 +}