inst/examples/checkWithText/server.R

shinyServer(
  function(input, output, session){

    output[["tree1"]] <- renderJstree({
      jstree(
        nodes, checkboxes = TRUE, dragAndDrop = TRUE
      )
    })

    output[["tree2"]] <- renderJstree({
      jstree(
        nodes, checkboxes = TRUE, checkWithText = FALSE, dragAndDrop = TRUE
      )
    })

    output[["checked1"]] <- renderPrint({
      input[["tree1_checked"]] |> Text()
    })

    output[["checked2"]] <- renderPrint({
      input[["tree2_checked"]] |> Text()
    })

    output[["selected1"]] <- renderPrint({
      input[["tree1_selected"]] |> Text()
    })

    output[["selected2"]] <- renderPrint({
      input[["tree2_selected"]] |> Text()
    })

  }
)

Try the jsTreeR package in your browser

Any scripts or data that you put into this service are public.

jsTreeR documentation built on July 4, 2024, 9:08 a.m.