mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-07 03:00:20 -04:00
log that invalidation has occured when an input value changes a key
This commit is contained in:
@@ -190,6 +190,9 @@ flushReact <- function() {
|
||||
getCurrentContext <- function() {
|
||||
.getReactiveEnvironment()$currentContext()
|
||||
}
|
||||
hasCurrentContext <- function() {
|
||||
!is.null(.getReactiveEnvironment()$.currentContext)
|
||||
}
|
||||
|
||||
getDummyContext <- function() {}
|
||||
local({
|
||||
|
||||
@@ -383,6 +383,21 @@ ReactiveValues <- R6Class(
|
||||
# key has be depended upon (can not happen if the key is being set)
|
||||
if (isTRUE(.hasRetrieved$keys[[key]])) {
|
||||
rLog$valueChangeKey(.reactId, key, value, domain)
|
||||
keyReactId <- rLog$keyIdStr(.reactId, key)
|
||||
if (hasCurrentContext()) {
|
||||
ctx <- getCurrentContext()
|
||||
rLog$invalidateStart(keyReactId, ctx$id, ctx$.reactType, ctx$.domain)
|
||||
on.exit(
|
||||
rLog$invalidateEnd(keyReactId, ctx$id, ctx$.reactType, ctx$.domain),
|
||||
add = TRUE
|
||||
)
|
||||
} else {
|
||||
rLog$invalidateStart(keyReactId, NULL, "other", domain)
|
||||
on.exit(
|
||||
rLog$invalidateEnd(keyReactId, NULL, "other", domain),
|
||||
add = TRUE
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user