Skip to content

Commit

Permalink
fixed selected values at init
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Sep 7, 2022
1 parent cf848ba commit 334f17d
Show file tree
Hide file tree
Showing 5 changed files with 242 additions and 316 deletions.
4 changes: 4 additions & 0 deletions R/input-treeview.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ treeviewInput <- function(inputId,
width = NULL) {
selected <- shiny::restoreInput(id = inputId, default = selected)
return_value <- match.arg(return_value)
if (!isTRUE(multiple) && length(selected) > 1) {
warning("Multiple selected values used but multiple = FALSE, only first one will be selected.")
selected <- selected[1]
}
options <- dropNulls(list(
config = c(
list(
Expand Down
2 changes: 1 addition & 1 deletion inst/packer/treeview.js

Large diffs are not rendered by default.

Loading

0 comments on commit 334f17d

Please sign in to comment.