rewind_pause() stops capture for a short time. It needs a
rewind_resume() call after it. This function is different. It removes
everything that rewind_enable() made:
Usage
rewind_disable(session = shiny::getDefaultReactiveDomain())Value
TRUE if the function disabled a session. FALSE if rewind
was not enabled. The function returns the value invisibly.
Details
it destroys each observer;
it sets the buttons and the history rail in the browser to their empty, disabled condition;
it returns the session to the condition before
rewind_enable().
Call rewind_enable() again to start a new history.
Use this function when the application permits undo and redo only in some conditions. An example is a user role that the application does not know at the start of the session.
Examples
if (interactive()) {
library(shiny)
server <- function(input, output, session) {
rewind_enable()
observeEvent(input$readonly_mode, {
if (input$readonly_mode) rewind_disable()
})
}
}