Skip to content

Commit

Permalink
Isolate names(...) in event_data() to prevent spurious updates (#…
Browse files Browse the repository at this point in the history
…2339)

* Isolate names(session$userData$plotlyInputStore) to prevent spurious updates (#2337)

* Update NEWS.md
  • Loading branch information
dvg-p4 committed Apr 27, 2024
1 parent 16261c3 commit dc6455f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/shiny.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dc6455f

Please sign in to comment.