An undo that skips an input is hard to explain from outside. The input
can be excluded, can be a password field, can be missing from inputs,
or can be one that the page cannot put back. This function lists every
input of the session with the reason, so one call answers the question.
Usage
rewind_status(session = shiny::getDefaultReactiveDomain())Value
A list:
captured: the names of the inputs that rewind records.skipped: a named character vector. Each name is an input, and each value is the reason it is not recorded:"excluded","password field","not in inputs","cannot be restored by the page","action button","file upload"or"NULL value". Inputs internal to Shiny and to rewind are left out of the list.tracked: the groups registered withrewind_track(), each with the fields it names (NULLfor all fields).restorable: the inputs that the page reported it can restore, orNULLbefore the report arrives. Refer torewind_enable().paused:TRUEbetweenrewind_pause()andrewind_resume().size,position: the number of steps, and the current one.
Details
It reads every input, so inside render*() the result follows the
inputs and the history. That makes it useful in a debug panel, for
example renderPrint(rewind_status()).
Examples
if (interactive()) {
library(shiny)
ui <- fluidPage(
rewind_buttons(),
selectInput("region", "Region", c("North", "South")),
passwordInput("pw", "Password"),
verbatimTextOutput("status")
)
server <- function(input, output, session) {
rewind_enable()
output$status <- renderPrint(rewind_status()$skipped)
}
shinyApp(ui, server)
}
