Files
shiny/man/observeEvent.Rd
Joe Cheng 62ef377dd1 Remove eventFilter for now
After discussing with @trestletech, the semantics are just not right.
When using it with a renderXXX function, it doesn't actually stop
recomputation, so the only reasonable place to use it is in a reactive
expression, but if that's true then this is a terrible looking API.
Will replace soon with something better.
2014-10-14 12:36:03 -07:00

30 lines
569 B
R

% Generated by roxygen2 (4.0.2): do not edit by hand
\name{observeEvent}
\alias{observeEvent}
\title{Event handler}
\usage{
observeEvent(eventExpr, callback, env = parent.frame(), quoted = FALSE)
}
\description{
Event handler
}
\examples{
\dontrun{
# In ui.R:
shinyUI(basicPage(
numericInput("n", "Number of observations", 5),
actionButton("saveButton", "Save")
))
# In server.R:
shinyServer(function(input, output) {
observeEvent(input$saveButton, function() {
write.csv(runif(input$n), file = "data.csv")
})
})
}
}
\seealso{
\code{\link{actionButton}}
}