I am trying to build a nested Dropdown in angular.
In the latest versions of primeng, I could find the CascadeSelectModule that does exactly that. However, in my angular app, I am using a previous version of primeng : v11.4.5. I am also using angular v11.
Is it possible to create such a nested dropdown with the DropdownModule ? or to import a different module, that is available in primeng V11 ?
Thank you for your help
I created 2 dropdowns like this :
<p-dropdown *ngIf="region.title =='Hottest Lesion'" [ngStyle]="{'position': 'absolute'}"
[options]="bodyPartList" [(ngModel)]="location" [disabled]="disableForms" optionLabel="name"
(onChange)="bodyPartChange()" placeholder="Select Body Location" filter="true"
resetFilterOnHide="true" [contentStyle]="{'overflow':'visible'}">
</p-dropdown>
<p-dropdown *ngIf="region.title =='Hottest Lesion'" [ngStyle]="{'position': 'absolute'}" [hidden]="!subPartList.length"
[options]="subPartList" [(ngModel)]="sublocation" [disabled]="disableForms"
optionLabel="name" (onChange)="sublocationChange()" placeholder="Select Sublocation"
filter="true" resetFilterOnHide="true" [contentStyle]="{'overflow':'visible'}">
</p-dropdown>
The goal is to change it into a nested one.
sonja Bennis is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.