View source: R/hierarchyInput.R
| hierarchyInput | R Documentation |
Creates a hierarchical slicer-style input similar to a Power BI date
hierarchy. The input value is a structured object (schema version 1) with
resolved, rollup, explicit, and summary fields.
hierarchyInput(
inputId,
label = NULL,
data,
levels,
selected = NULL,
expanded = NULL,
placeholder = "Selección múltiple",
display = c("inline", "dropdown"),
search = FALSE,
searchPlaceholder = "Buscar...",
selectAll = TRUE,
selectAllLabel = "Seleccionar todo",
expand = c("first", "all", "none"),
width = "100%",
height = "360px"
)
inputId |
The input slot that will be used to access the value. |
label |
Optional label displayed above the component. |
data |
A data frame containing the hierarchy columns. |
levels |
Character vector with column names, ordered from highest to lowest hierarchy level. |
selected |
Optional character vector of node ids to select initially. |
expanded |
Optional character vector of node ids to expand initially. |
placeholder |
Text shown when nothing is selected. |
display |
Visual presentation: |
search |
Whether to show a search box above the tree. |
searchPlaceholder |
Placeholder for the search field. |
selectAll |
Whether to show the select-all row. |
selectAllLabel |
Label for the select-all control. |
expand |
Initial expansion mode: first level, all levels, or none. |
width |
CSS width of the component. |
height |
CSS max-height of the tree area. |
The value received from the browser is user-controlled and must not be used as an authorization mechanism. Applications that filter sensitive data must validate selected ids against the server-side hierarchy and permissions.
A Shiny HTML object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.