From ca2b87d007492ded79cda535d56138a0fa987a1a Mon Sep 17 00:00:00 2001 From: Carson Date: Fri, 2 Jul 2021 12:59:57 -0500 Subject: [PATCH] Inovoke change handler immediately --- inst/htmlwidgets/plotly.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inst/htmlwidgets/plotly.js b/inst/htmlwidgets/plotly.js index 97980a7e64..542c6ff374 100644 --- a/inst/htmlwidgets/plotly.js +++ b/inst/htmlwidgets/plotly.js @@ -430,7 +430,7 @@ HTMLWidgets.widget({ traceManager.updateFilter(set, e.value); }; filter.on("change", filterChange); - + if (filter.invokeChangeHandler) filter.invokeChangeHandler(); var selectionChange = function(e) { @@ -486,6 +486,7 @@ HTMLWidgets.widget({ } } selection.on("change", selectionChange); + if (selection.invokeChangeHandler) selection.invokeChangeHandler(); // Set a crosstalk variable selection value, triggering an update var turnOn = function(e) {