Skip to content

Commit 74e1781

Browse files
committed
Close #1584: Prevent multiple selectize/dynamic color brushes from being rendered in shiny
1 parent 8201019 commit 74e1781

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ supply_highlight_attrs <- function(p) {
379379

380380
# include one selectize dropdown per "valid" SharedData layer
381381
if (isTRUE(p$x$highlight$selectize)) {
382-
p$x$selectize[[new_id()]] <- list(
382+
p$x$selectize[[i]] <- list(
383383
items = data.frame(value = k, label = k), group = i
384384
)
385385
}

inst/htmlwidgets/plotly.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ HTMLWidgets.widget({
7474
});
7575

7676
// inject a "control panel" holding selectize/dynamic color widget(s)
77-
if (x.selectize || x.highlight.dynamic && !instance.plotly) {
77+
if ((x.selectize || x.highlight.dynamic) && !instance.plotly) {
7878
var flex = document.createElement("div");
7979
flex.class = "plotly-crosstalk-control-panel";
8080
flex.style = "display: flex; flex-wrap: wrap";

0 commit comments

Comments
 (0)