inst/examples/contextMenu2/server.R

shinyServer(
  function(input, output, session){
    output[["mytree"]] <- renderJstree({
      jstree(
        nodes,
        checkCallback = TRUE,
        contextMenu = list(items = customMenu),
        types = list(
          "unalterable" = list(icon = "fa-solid fa-leaf"),
          "parent"      = list(icon = "fa-brands fa-pagelines")
        ),
        theme = "proton"
      )
    })
  }
)

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.