Skip to content

Commit dc6455f

Browse files
authored
Isolate names(...) in event_data() to prevent spurious updates (#2339)
* Isolate names(session$userData$plotlyInputStore) to prevent spurious updates (#2337) * Update NEWS.md
1 parent 16261c3 commit dc6455f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

NEWS.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# plotly (development version)
22

3+
## Bug fixes
4+
5+
* Closed #2337: Creating a new `event_data()` handler no longer causes a spurious reactive update of existing `event_data()`s. (#2339)
6+
37
# 4.10.4
48

59
## Improvements

R/shiny.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ event_data <- function(
193193

194194
} else {
195195

196-
eventHasStorage <- eventID %in% names(session$userData$plotlyInputStore)
196+
eventHasStorage <- eventID %in% shiny::isolate(names(session$userData$plotlyInputStore))
197197

198198
if (!eventHasStorage) {
199199
# store input value as a reactive value to leverage caching

0 commit comments

Comments
 (0)