Questions tagged [jstreer]

jsTreeR is an R package that wraps the JavaScript library jsTree.

https://github.com/stla/jsTreeR

16 questions
2
votes
2 answers

How to remove the option for the user to collapse a specified parent node in jsTreeR?

Any recommendations for how to make only specific nodes in package jsTreeR non-collapsible, while all other nodes remain collapsible as illustrated below? The code is posted beneath the illustration. Code: library(jsTreeR) library(shiny) nodes <-…
Village.Idyot
  • 1,359
  • 2
  • 8
2
votes
1 answer

How to add sequential numbering to elements dragged into a hierarchy node using jsTreeR?

I am evaluating different options for allowing users to build a hierarchy of a series of mathematical operations, and am trying out different packages such as jsTreeR, shinyTree, shinyDND, sortable, and last resort (giving up on a user-friendly…
1
vote
1 answer

How to run R code from inside a JS section of code?

I have some experience with R by now but very little knowledge of JS. The below reproducible code uses JS to run the package jsTreeR so the user can custom build a hierarchy tree. I would like to replace the JS line in the reproducible code flagged…
1
vote
1 answer

How to pull specific node elements from a jsTree into an R data frame?

In running the below reproducible code, I'm trying to extract specific node elements from a jsTree (using the jsTreeR package) into a data frame. Similar to what was done in related post that used sortable DnD instead of jstree at How to pull list…
1
vote
1 answer

How to delete hierarchical tree elements rendered using the jsTreeR package?

In running the reproducible code below, the user drags elements from the fixed options listed in the "Menu" node at the top of the hierarchy tree to the "Drag here" node underneath. I'm trying to figure out how the user can delete elements in the…
0
votes
1 answer

How to prevent dropping branch nodes on leaf nodes with library(jsTreeR)

This is a follow-up post on my earlier question here. @StéphaneLaurent and @ismirsehregal provided me with some great input on how to customize jsTreeR's context menu: library(jsTreeR) library(shiny) nodes <- list( list( text = "Branch 1", …
ahnungslos
  • 29
  • 4
0
votes
2 answers

How to create a subset of uneditable leaf nodes with library(jsTreeR)

I'm wondering if it is possible to create a subset of uneditable leaf nodes with {jsTreeR}. The expected behaviour for the leafs is, that they can't be: renamed deleted have own child nodes Moreover, branch nodes should not be deleted if they have…
ahnungslos
  • 29
  • 4
0
votes
0 answers

Is there a way to shade or otherwise visually differentiate displayed nodes when running jsTreeR for building hierarchy trees?

When running the code posted at the bottom, the user can drag child elements down from the "Menu" parent node down to another node underneath for purpose of receiving the dragged items (">> Drag here <<") and thus build a custom hierarchy tree. I'm…
Village.Idyot
  • 1,359
  • 2
  • 8
0
votes
1 answer

How to add hover-over text pop ups over menu list items in jsTreeR?

I've been an active user of the jsTreeR package, inside of Shiny. When running the below skeletal code, a menu of draggable options is presented at the top, and the user drags these items down to the target list labeled ">> Drag here <<" to build a…
Village.Idyot
  • 1,359
  • 2
  • 8
0
votes
1 answer

Why is this Shiny Handler not correctly updating the JS section of the client?

When running the reproducible code at the bottom, I get the strange results in the tree rendered on the left as illustrated in the image below. What am I doing wrong, in my use of the handlers or perhaps in JS script? "Elements" reads the positions…
0
votes
1 answer

How to use a Shiny handler to pass output of R function into JS section of Shiny code?

I have some experience with R but little knowledge or understanding of JS. The below reproducible code uses JS to run package jsTreeR so the user can custom build a hierarchy tree. The code allows the user to drag/drop elements from the "Menu"…
0
votes
1 answer

How to get parent node properties to child node in JSTree Using RShiny Application

I am working with JSTree using R-shiny. I am trying to generate a child node which will get its parents' node properties. I have tried many times but could not get the desired output. I am using the following code. please take a look and tell update…
0
votes
1 answer

How to add secondary sequential numbering to elements dragged in to a hierarchy tree node using jstree?

I am trying to add secondary sequential numbering to elements dragged in to a hierarchy tree node, using the package jsTreeR, as shown in the illustration at the bottom. Below is the reproducible code used for the illustration. This sequential…
0
votes
1 answer

How to reorder sequential numbering when using drag and drop with a jsTree for a hierarchy tree?

I am trying to generate sequential numbering for elements dragged-in (copied-over) from one hierarchy tree node to another node, while giving the user the option of where to drop the element in the target node. The sequential numbering should…
0
votes
1 answer

How to copy specified items rather than moving when using drag and drop in the shinyTree package?

I am trying out the shinyTree package to see if it works for my hierarchy tree needs, per post How to build a drag and drop hierarchical tree with user inputs using shinyTree, jsTreeR, or similar package?. In the following reproducible code, the…
1
2