Skip to contents

Creates a shiny.fluent combo box

Usage

make_combobox(
  i18n = character(),
  ns = character(),
  id = NA_character_,
  label = character(),
  options = list(),
  value = NULL,
  multiSelect = FALSE,
  allowFreeform = FALSE,
  autoComplete = "on",
  width = NULL
)

Arguments

i18n

Translator object from shiny.i18n library

ns

Shiny namespace

id

ID used for the input (character)

label

Label used for the input (character)

options

Options available for the combobox (list)

value

Value of the combobox (character)

multiSelect

Is multiselection of options is possible ? (logical)

allowFreeform

Allows user to enter free text, not provided in the options / choices (logical)

autoComplete

Auto completion of the text entered in the combobox, to match with available options / choices ("on" of "off") (character)

width

Width of the dropdown, CSS code so "300px" or "100%" are accepted

Examples

if (FALSE) {
options <- list(
  list(key = "my_key1", text = "my_text1"),
  list(key = "my_key2", text = "my_text2")
)
make_combobox(i18n = i18n, ns = NS("settings_datasets"), id = "my_dropdown", label = "my_dropdown",
  options = options, value = "my_key1", multiSelect = FALSE, allowFreeform = FALSE, autoComplete = "on",
  width = "100%", disabled = FALSE)
}