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

763 views Asked by At

I am using primg-ng tree for the sidebar in my project. enter image description here

The output is:

enter image description here

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 virtual scrolling

1

There are 1 answers

0
mohammad msd On

hi your problem will be solved by using this styles

.p-tree .p-tree-container .p-treenode {
  padding: 0.143rem;
  padding-right: 1rem;
}
.p-treenode-label{
  padding-right: 0.5rem;
}