2

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

Antikhippe
  • 6,316
  • 2
  • 28
  • 43
Goofy
  • 210
  • 1
  • 3
  • 17
  • No, you can't. Source code don't use Node's icon properties. See https://github.com/primefaces/primeng/blob/8838002c0b8697cffb88b90b1c2419ac4333a13d/src/app/components/treetable/treetable.ts#L2878 – phucnh Dec 03 '20 at 04:06

1 Answers1

4

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

Antikhippe
  • 6,316
  • 2
  • 28
  • 43