Search code examples
htmlcssangularprimengprimeng-treetable

PrimeNG treeTable - change default expandedIcon/collapsedIcon


I am using treeTable from primeNG. I wanted to know how to change default expand and collapse icon.

I tried doing so... but I am not sure if I'm doing it the right way. I just want to replace those default expand/collapse icons to plus/minus. How do I go about?

I tried following.. but it didn't help.

enter image description here

demo


Solution

  • Here is how you can replace those icons in your CSS:

    ::ng-deep .pi-chevron-right:before {
      content: "\e90d";
    }
    
    ::ng-deep .pi-chevron-down:before {
      content: "\e90f";
    }
    

    See demo