% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/input-treecheck.R
\name{treecheckInput}
\alias{treecheckInput}
\title{Tree check Input}
\usage{
treecheckInput(
  inputId,
  label = NULL,
  choices,
  selected = NULL,
  hierarchical = TRUE,
  levels = 1,
  borders = TRUE,
  ...,
  nodes_input = FALSE,
  return_value = c("name", "id", "all"),
  width = NULL
)
}
\arguments{
\item{inputId}{The \code{input} slot that will be used to access the value.}

\item{label}{Display label for the control, or \code{NULL} for no label.}

\item{choices}{A \code{list} to be used as choices, can be created with \code{\link[=make_tree]{make_tree()}}.}

\item{selected}{Default selected value, must correspond to the Id of the node.}

\item{hierarchical}{When a level is selected, also select all levels below it?}

\item{levels}{Sets the number of hierarchical levels deep the tree will be expanded to by default.}

\item{borders}{Show or not borders around items.}

\item{...}{Others parameters passed to JavaScript treeview method.}

\item{nodes_input}{Send nodes data through an input value : \verb{input$<inputId>_nodes}.}

\item{return_value}{Value returned server-side, default is the element name,
other possibilities are \code{"id"} (works only if nodes have an id) or
\code{"all"} to returned all the tree under the element selected.}

\item{width}{The width of the input, e.g. \code{'400px'}, or \code{'100\%'}.}
}
\value{
Server-side: A \code{character} value or a \code{list} depending on the \code{return_value} argument.
}
\description{
Tree check Input
}
\examples{

library(shiny)
library(shinytreeview)

data("cities")

ui <- fluidPage(
  tags$h3("treeviewInput cities example"),
  treecheckInput(
    inputId = "tree",
    label = "Choose a city:",
    choices = make_tree(
      cities, c("continent", "country", "city")
    )
  ),
  verbatimTextOutput(outputId = "result")
)

server <- function(input, output, session) {
  output$result <- renderPrint({
    input$tree
  })
}

if (interactive())
  shinyApp(ui, server)
}
\seealso{
\code{\link[=updateTreeview]{updateTreeview()}} and others functions to manipulate tree server-side.
}
