R/refresh.R

Defines functions refresh

Documented in refresh

#' Refresh the page
#' 
#' @examples 
#' if (interactive()) {
#'   library(shiny)
#'   ui <- fluidPage(
#'     useShinyjs(),
#'     textInput("text", "Text", "text"),
#'     actionButton("refresh", "Refresh")
#'   )
#'
#'   server <- function(input, output, session) {
#'     observeEvent(input$refresh, {
#'       refresh()
#'     })
#'   }
#'
#'  shinyApp(ui, server)
#' }
#' 
#' @export
refresh <- function() {
  fxn <- "refresh"
  params <- list()
  jsFuncHelper(fxn, params)
}

 

Try the shinyjs package in your browser

Any scripts or data that you put into this service are public.

shinyjs documentation built on Dec. 23, 2021, 5:06 p.m.