R/toggleModal.R

Defines functions toggleModal

#'toggleModal modified from the shinyBS package for R
#'
#'\code{toggleModal} is used within your Server logic to open or close a modal
#'window.
#'
#'@param session The session object passed to function given to shinyServer.
#'@param modalId The id of the modal window you want to open/close
#'@param toggle Should the modal window \code{open}, \code{close}, or \code{toggle}?
#'
#'@templateVar item_name toggleModal
#'@templateVar family_name Modals
#'@template item_details
#'@template footer
#'@export
toggleModal <- function(session, modalId, toggle = "toggle") {
  
  session$sendInputMessage(modalId, list(toggle = toggle))
  
}
jjlynch2/OsteoShiny documentation built on Aug. 6, 2019, 5:32 p.m.