Questions tagged [primeng-tree]

17 questions
1
vote
1 answer

How to recursively merge the same node elements of a JSON tree

How to gather the same parent elements of a tree in a nested way. I have a JSON array with different nesting levels. I have this: var jsonArray = [ { label: 'Parent 1', id: '26', children: [ { label: 'child 11', id: '139', …
medah
  • 27
  • 4
1
vote
1 answer

Need to show a textbox on double click for the particular primeng tree node

I have a primeng tree node. When I click the node label, it should turn into a text box but for only to that node. I tried with a Boolean flag, it works but shows up all textbox. Is there a simple fix to show up the text box only for that node? Here…
Ranjith Varatharajan
  • 1,596
  • 1
  • 33
  • 76
1
vote
0 answers

Angular primeng v11.x setting scroll height to p-tree not displaying scroll

i am using primeng v11.x and using p-tree to display hierarchy values. As the list is quite big, i want to fix a height. i am using following but the scroll bar not appearing in the p-tree.
Mukil Deepthi
  • 6,072
  • 13
  • 71
  • 156
1
vote
1 answer

Angular primeng v11.x how to achieve treeselect functionality in tree component

I am using primeng v11.x and i am using p-tree to display hierarchy view with checkbox. but i want to display this inside a dropdown as in p-treeselect. unfortunately i can't upgrade primeng at the moment. is there a way to achieve this? because the…
Mukil Deepthi
  • 6,072
  • 13
  • 71
  • 156
1
vote
0 answers

Is there any method to find the index of tree leaf node for PrimeNG tree

I need to make buttons for going next and previous from the selected leaf nodes, and was thinking of using the index. Is there a way to get the index, I looked in the documents, it does show a parent property for defining in a node, but no relevant…
Architrixs
  • 58
  • 2
  • 6
1
vote
1 answer

Primeflex + PrimeNG tab + PrimeNG tree - unable to make tabPanel grow

Could someone help me with the layout of those PrimeNG components? I would like to have a tree taking the whole vertical space (minus buttonset at the bottom), scrolling if needed. Tree is being places inside a tab panel. Thanks in…
Kodak
  • 1,779
  • 2
  • 18
  • 29
0
votes
0 answers

Horizontal tree with checkbox selection

Is there a way to use a horizontal tree with selectionMode="checkbox"? I have seen an example using PrimeFaces, but I needed this in PrimeNG. I have tried this: HTML
joaorodr84
  • 1,251
  • 2
  • 14
  • 33
0
votes
1 answer

TypeError: Cannot set property scrollHeight of [object Element] which has only a getter

I am using PrimeNg v11.x element. Application is working fine with scrollHeight value set from a variable but the jasmine test is failing with error: TypeError: Cannot set property scrollHeight of [object Element] which has only a getter …
Mukil Deepthi
  • 6,072
  • 13
  • 71
  • 156
0
votes
1 answer

PrimeNG - Tree DragDrop, nodes are not draggable

I am following this example from the official PrimeNG website to implement a very basic DragDrop Tree (I only need the re-ordering functionality, all nodes are leaves without children). The tree (which is constructed dynamically) is constructed…
NickAth
  • 1,089
  • 1
  • 14
  • 35
0
votes
1 answer

How to find a node by id in the PrimeNg tree?

We are moving from Angular Tree Component to the PrimeNg Tree component. The tree selection is saved and restored when the application starts. We save the key field (folderId in our case). Angular Tree Component exposes this method for finding the…
Developer Thing
  • 2,704
  • 3
  • 21
  • 26
0
votes
1 answer

Why is drag and drop not working in this PrimeNG tree?

I've been using PrimeNG's Tree for some months and noticed today that drag and drop is no longer working. I get no errors, I simply can't grab hold of a node in the tree. I stripped the tree and data down to bare bones as shown below, to verify it…
blogofsongs
  • 2,527
  • 4
  • 21
  • 26
0
votes
1 answer

PrimeNg (7.x) / P-TREE / Filter / Double scroll bar

When I add the filter property on a PrimeNg (7.x) p-tree it works as expected but I have a double scroll bar. The implementation is not special
Jean-Philippe M
  • 731
  • 1
  • 7
  • 19
0
votes
1 answer

Angular Prime-ng p-tree, how to change indentation?

I am using primg-ng tree for the sidebar in my project. The output is: I want to have consistent indentation without adaptively changing like the output above. Also, I want to have the ability to change the indentation level. Note: I don't want…
Yogesh
  • 658
  • 8
  • 20
0
votes
1 answer

How can I know when the data are loaded on p-tree and select first node?

I was trying to select the first node of the Angular PrimeNG tree component, but the only thing I manage to do is to select the root node, but that doesn't trigger the click event of it. I am trying to find a way of how to trigger the click event on…
wilbi
  • 225
  • 2
  • 14
0
votes
2 answers

How can I clone a tree structure of an array of objects to another one, changing attributes to the cloned?

How can I clone a tree structure of an array of objects to another one, having different or less attibutes on the cloned one in TypeScript? For example on this: [ { "name":"root_1", "extradata":"whatever", "anArray":[ {…
wilbi
  • 225
  • 2
  • 14
1
2