Skip to content

Commit

Permalink
Follow up to #1936: hash the selectize id so it can be used as an HTM…
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert committed Apr 15, 2021
1 parent 3581d7a commit e02a704
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Imports:
vctrs,
tibble,
lazyeval (>= 0.2.0),
rlang,
rlang (>= 0.4.10),
crosstalk,
purrr,
data.table,
Expand Down
4 changes: 3 additions & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,9 @@ supply_highlight_attrs <- function(p) {

# include one selectize dropdown per "valid" SharedData layer
if (isTRUE(p$x$highlight$selectize)) {
p$x$selectize[[i]] <- list(
# Hash i (the crosstalk group id) so that it can be used
# as an HTML id client-side (i.e., key shouldn't contain spaces)
p$x$selectize[[rlang::hash(i)]] <- list(
items = data.frame(value = k, label = k), group = i
)
}
Expand Down

0 comments on commit e02a704

Please sign in to comment.