Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template to expand / collapse on name click #321

Open
tulipandmills opened this issue May 19, 2022 · 0 comments
Open

Template to expand / collapse on name click #321

tulipandmills opened this issue May 19, 2022 · 0 comments

Comments

@tulipandmills
Copy link

tulipandmills commented May 19, 2022

How can I make the items to be clickable, just like the icon, to toggle the expansion state?
I am not using selection features

Please find my current example working with only the icon being clickable, not the icons:

<tree-ngx [nodeItems]="tree" [options]="options" #treeRef>
                <ng-template #nodeNameTemplate let-node="node" let-context="context">
                    <ng-container *ngIf="node.code; else Else">
                        <span>code: </span>
                        <a (click)="openTab(node.code)" class="link">
                            <span>{{node.code}}</span>
                            <i class="pi pi-external-link popIcon"></i>
                        </a>
                    </ng-container>
                    <ng-template #Else>
                        <span>{{node.name}}</span>
                    </ng-template>
                </ng-template>
            </tree-ngx>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant