This creates a spot in your Shiny UI for a shinyTree which can then be filled
in using renderTree
.
shinyTree(
outputId,
checkbox = FALSE,
search = FALSE,
searchtime = 250,
dragAndDrop = FALSE,
types = NULL,
theme = "default",
themeIcons = TRUE,
themeDots = TRUE,
sort = FALSE,
unique = FALSE,
wholerow = FALSE,
stripes = FALSE,
multiple = TRUE,
animation = 200,
contextmenu = FALSE,
three_state = TRUE,
whole_node = TRUE,
tie_selection = TRUE
)
The ID associated with this element
If TRUE
, will enable checkboxes next to each node to
make the selection of multiple nodes in the tree easier.
If TRUE
, will enable search functionality in the tree by adding
a search box above the produced tree. Alternatively, you can set the parameter
to the ID of the text input you wish to use as the search field.
Determines the reaction time of the search algorithm. Default is 250ms.
If TRUE
, will allow the user to rearrange the nodes in the
tree.
enables jstree types functionality when sent proper json (please see the types example)
jsTree theme, one of default
, default-dark
, or proton
.
If TRUE
, will show theme icons for each item.
If TRUE
, will include level dots.
If TRUE
, will sort the nodes in alphabetical/numerical
order.
If TRUE
, will ensure that no node name exists more
than once.
If TRUE
, will highlight the whole selected row.
If TRUE
, the tree background is striped.
If TRUE
, multiple nodes can be selected.
The open / close animation duration in milliseconds.
Set this to FALSE
to disable the animation (default is 200).
If TRUE
, will enable a contextmenu to
create/rename/delete/cut/copy/paste nodes.
If TRUE
, a boolean indicating if checkboxes should cascade down and have an undetermined state
If TRUE
,a boolean indicating if clicking anywhere on the node should act as clicking on the checkbox
If TRUE
, controls if checkbox are bound to the general tree selection or to an internal array maintained by the checkbox plugin.
A shinyTree is an output *and* an input element in the same time. While you can
fill it via renderTree
you can access its content via input$tree
(for example after the user rearranged some nodes). By default, input$tree
will
return a list similiar to the one you use to fill the tree. This behaviour is controlled
by getOption("shinyTree.defaultParser")
. It defaults to "list"
, but can be set
to "tree"
, in which case a data.tree
is returned.
renderTree