How can I assign "selectionMode" only to leaves in a PrimeNG tree?

Discussão em 'Angular' iniciado por TheHealthyGaming, Janeiro 13, 2025.

  1. I have two categories with variable subcategories which have variable sub-subcategories. I want to be able to only select the sub-subcategories, nothing else.

    p-tree
    [value]="treeItems"
    selectionMode="single"
    [(selection)]="selectedIndicator"
    (onNodeSelect)="nodeSelect()"
    >
    </p-tree>


    I tried finding if a class is added to the leaves, but I couldn't figure it out.

    Continue reading...

Compartilhe esta Página