Skip to content

Commit 3581d7a

Browse files
authored
Prevent multiple selectize/dynamic color brushes from being rendered in shiny (#1936)
* Close #1584: Prevent multiple selectize/dynamic color brushes from being rendered in shiny * Update news
1 parent 8341a47 commit 3581d7a

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## BUG FIXES
44

5+
* Duplicate `highlight(selectize=T)` dropdowns are no longer rendered in Shiny (#1936).
56
* `group_by.plotly()` now properly retains crosstalk information across `{dplyr}` versions (#1920).
67
* Fixes some issues with `name` and `frames` when both attributes are specified. (#1903 and #1618).
78

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)