From 2277263b553ceccb0d1de57ecbb1eeae6b9f554f Mon Sep 17 00:00:00 2001 From: Dan Gealow Date: Mon, 5 Feb 2024 13:04:16 -0500 Subject: [PATCH 1/2] Isolate names(session$userData$plotlyInputStore) to prevent spurious updates (#2337) --- R/shiny.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/shiny.R b/R/shiny.R index 583b4492f8..a25b653aac 100644 --- a/R/shiny.R +++ b/R/shiny.R @@ -193,7 +193,7 @@ event_data <- function( } else { - eventHasStorage <- eventID %in% names(session$userData$plotlyInputStore) + eventHasStorage <- eventID %in% shiny::isolate(names(session$userData$plotlyInputStore)) if (!eventHasStorage) { # store input value as a reactive value to leverage caching From 1606a8372f6b82dbe1e3684f89aa720b8ab72d44 Mon Sep 17 00:00:00 2001 From: Dan Gealow Date: Fri, 26 Apr 2024 19:00:10 -0400 Subject: [PATCH 2/2] Update NEWS.md --- NEWS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index 7471198093..f56c1cf414 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # plotly (development version) +## Bug fixes + +* Closed #2337: Creating a new `event_data()` handler no longer causes a spurious reactive update of existing `event_data()`s. (#2339) + # 4.10.4 ## Improvements