snap_exclude() adds regular expressions; inputs whose fully namespaced
id matches any of them are left out of snapshots and ignored on restore.
snap_include() adds patterns that an id must match to be captured at
all. Both accumulate over calls within a session and complement the
exclude/include arguments of snap_enable() and snap_take().
Usage
snap_exclude(patterns, session = shiny::getDefaultReactiveDomain())
snap_include(patterns, session = shiny::getDefaultReactiveDomain())Details
Ids excluded with shiny's setBookmarkExclude() are always honoured too,
and action buttons, password inputs, and file inputs are never captured
as input values.
Examples
if (interactive()) {
library(shiny)
server <- function(input, output, session) {
snap_exclude(c("^btn_", "^nav_"))
snap_include(c("^model_", "^prefs_"))
}
}
