1
votes

I am Creating Web Application with Angular using the PrimeNg UI Framework. I use the TreeTable Component. The TreeTable Component has an Event called 'onNodeExpand' which will be triggerd once a node gets Expandend.

Now comes my question:
Is there a way to prevent this onNodeExpand to occur so when you click on the expand Icon nothing happens?

1

1 Answers

1
votes

Just do like this:

<p-treeTable [value]="files" [columns]="cols" (onNodeExpand)="onNodeExpand($event)">

in component.ts file read the event and set the expanded property false;

onNodeExpand(event) {
    event.node.expanded=false;
  }