Skip to content

Commit

Permalink
Close #1131. Pass the relevant shinysession from renderFunc to snapsh…
Browse files Browse the repository at this point in the history
…otPreprocessInput (#1132)
  • Loading branch information
cpsievert committed Mar 15, 2024
1 parent 63517cb commit 578f7cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/shiny.R
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ renderDataTable = function(
uiFunc = dataTableOutput,
renderFunc = function(shinysession, name, ...) {
domain = tempVarsPromiseDomain(outputInfoEnv, outputName = name, session = shinysession)
removeTimestampFromSnapshot(name)
removeTimestampFromSnapshot(name, shinysession)
promises::with_promise_domain(domain, renderFunc())
},
outputArgs = outputArgs,
Expand Down Expand Up @@ -231,11 +231,11 @@ setAll = function(lst, env) {
invisible()
}

removeTimestampFromSnapshot = function(name) {
removeTimestampFromSnapshot = function(name, session) {
shiny::snapshotPreprocessInput(paste0(name, "_state"), function(value) {
value$time <- NULL
value
})
}, session)
}

# This promise domain is needed to set/unset temporary variables in
Expand Down

0 comments on commit 578f7cd

Please sign in to comment.