Adds an input to select from the entered options.
Usage
input_select(label, options, default = -1, display = options, id = label,
..., note = NULL, group_feature = NULL, variable = NULL,
dataset = NULL, depends = NULL, dataview = NULL, subset = "filtered",
selection_subset = "full_filter", filters = NULL, reset_button = FALSE,
button_class = NULL, as.row = FALSE, floating_label = TRUE)
Arguments
- label
Label of the input for the user.
- options
A vector of options, the name of a variable from which to pull levels, or
"datasets"
,"variables"
,"ids"
, or"palettes"
to select names of datasets, variables, entity ids, or color palettes. If there is a map with overlay layers with properties, can also be"overlay_properties"
, to select between properties.- default
Which of the options to default to; either its index or value.
- display
A display version of the options.
- id
Unique ID of the element to be created.
- ...
Additional attributes to set on the select element.
- note
Text to display as a tooltip for the input.
- group_feature
Name of a measure or entity feature to use as a source of option grouping, if
options
is"variables"
or"ids"
.- variable
The name of a variable from which to get levels (overwritten by
depends
).- dataset
The name of an included dataset, where
variable
should be looked for; only applies when there are multiple datasets with the same variable name.- depends
The ID of another input on which the options depend; this will take president over
dataset
andvariable
, depending on this type of inputdepends
points to.- dataview
The ID of an
input_dataview
, used to filter the set of options, and potentially specify dataset if none is specified here.- subset
Determines the subset of options shown if
options
is"ids"
; mainly"filtered"
(default) to apply all filters, including the current selection, or"full_filter"
to apply all feature and variable filters, but not the current selection."siblings"
is a special case given a selection, which will show other IDs with the same parent.- selection_subset
Subset to use when a selection is made; defaults to
"full_filter"
.- filters
A list with names of
meta
entries (fromvariable
entry indata_add
'smeta
list), and values of target values for those entries, or the IDs of value selectors.- reset_button
If specified, adds a button after the select element that will revert the selection to its default; either
TRUE
, or text for the reset button's label.- button_class
Class name to add to the reset button.
- as.row
Logical; if
TRUE
, the label and input are in separate columns within a row.- floating_label
Logical; if
FALSE
oras.row
isTRUE
, labels are separate from their inputs.