diff --git a/DESCRIPTION b/DESCRIPTION index 3869c99a..d93c0847 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: esquisse Type: Package Title: Explore and Visualize Your Data Interactively -Version: 1.1.0.9100 +Version: 1.1.0.9200 Authors@R: c(person("Fanny", "Meyer", role = c("aut")), person("Victor", "Perrier", email = "victor.perrier@dreamrs.fr", role = c("aut", "cre")), person("Ian", "Carroll", comment = "Faceting support", role = "ctb"), diff --git a/NEWS.md b/NEWS.md index df956735..9ad01854 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,10 @@ + spanish, activate with `set_i18n("es")`, thanks to [@drdsdaniel](https://github.com/drdsdaniel) + albanian (updated), activate with `set_i18n("al")`, thanks to [@EGjika](https://github.com/EGjika) +### Bug fixes + +* Fix `selected` argument of `dragulaInput()` being ignored outside bookmarking. + # esquisse 1.1.0 diff --git a/R/input-dragula.R b/R/input-dragula.R index dbaeeafa..272039af 100644 --- a/R/input-dragula.R +++ b/R/input-dragula.R @@ -65,8 +65,8 @@ dragulaInput <- function(inputId, boxStyle = NULL, width = NULL, height = "100px") { - - bookmark <- restoreInput(id = inputId, default = selected) + + bookmark <- restoreInput(id = inputId, default = NULL) if (!is.null(bookmark)) { selected <- bookmark$target } @@ -77,14 +77,14 @@ dragulaInput <- function(inputId, targets <- generate_targets( inputId = inputId, - args = args, + args = args, targetsLabels = targetsLabels, - targetsIds = targetsIds, + targetsIds = targetsIds, selected = selected, - replace = replace, - boxStyle = boxStyle, - badge = badge, - status = status, + replace = replace, + boxStyle = boxStyle, + badge = badge, + status = status, height = height ) targetsIds <- targets$ids @@ -160,7 +160,7 @@ generate_targets <- function(inputId, args, targetsLabels, targetsIds, selected, targetsIds <- targetsLabels } stopifnot(length(targetsLabels) == length(targetsIds)) - + target_ids <- makeId(targetsIds) replaceTargets <- target_ids @@ -237,7 +237,7 @@ make_bg_svg <- function(text) { #' @title Update Dragula Input -#' +#' #' @description Update [dragulaInput()] widget server-side. #' #' @param session The `session` object passed to function given to `shinyServer`.