Title: | jsTree Bindings for Shiny |
---|---|
Description: | Exposes bindings to jsTree -- a JavaScript library that supports interactive trees -- to enable a rich, editable trees in Shiny. |
Authors: | Trestle Technology, LLC [aut], Jeff Allen [cre], Institut de Radioprotection et de Sûreté Nucléaire [cph], Ivan Bozhanov [ctb, cph] (jsTree), The Dojo Foundation [ctb, cph] (require.js), jQuery Foundation, Inc. [ctb, cph], Mike Schaffer [ctb], Timm Danker [ctb] |
Maintainer: | Jeff Allen <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.3.11 |
Built: | 2024-11-03 02:48:57 UTC |
Source: | https://github.com/timelyportfolio/shinyTree |
Get Leaf Nodes
get_leaf_nodes(tree = NULL)
get_leaf_nodes(tree = NULL)
tree |
|
Extract the nodes from the tree that are selected in a more convenient format. You can choose which format you prefer.
get_selected(tree, format = c("names", "slices", "classid"))
get_selected(tree, format = c("names", "slices", "classid"))
tree |
The |
format |
In which format you want the output. Use
|
Get Selected Nodes
get_selected_nodes(tree = NULL, field = NULL)
get_selected_nodes(tree = NULL, field = NULL)
tree |
|
field |
|
Get State for Leaf Nodes
get_state_nodes(tree = NULL, leaves = TRUE)
get_state_nodes(tree = NULL, leaves = TRUE)
tree |
|
leaves |
|
Renders a tree with no defined nodes.
shinyTree
.
renderEmptyTree(env = parent.frame(), quoted = FALSE)
renderEmptyTree(env = parent.frame(), quoted = FALSE)
Should return a list from the given expression which will be converted into a
shinyTree
.
renderTree(expr, env = parent.frame(), quoted = FALSE)
renderTree(expr, env = parent.frame(), quoted = FALSE)
expr |
The expression to be evaluated which should produce a list. |
env |
The environment in which |
quoted |
Is |
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, dragAndDrop = FALSE, theme = "default", themeIcons = TRUE, themeDots = TRUE, config = NULL )
shinyTree( outputId, checkbox = FALSE, search = FALSE, dragAndDrop = FALSE, theme = "default", themeIcons = TRUE, themeDots = TRUE, config = NULL )
outputId |
The ID associated with this element |
checkbox |
If |
search |
If |
dragAndDrop |
If |
theme |
jsTree theme, one of |
themeIcons |
If |
themeDots |
If |
config |
|
Extract the nodes from the tree that are selected in a more convenient format. You can choose which format you prefer.
updateTree(session, treeId, data = NULL)
updateTree(session, treeId, data = NULL)
session |
The current session variable. |
treeId |
The identifier for the shinyTree object |
data |
JSON data or nested list representing the new tree structure. |