'PrimeNG - Dropdown - How to customize by adding few fields in ng-template

I want to add a form with three or four controls instead of default text box in prime Ng dropdown.

I tried with ng-template pTemplate="header" and also ng-template pTemplate="selectedItem".

With ptemplate="header", it is working fine. however if when i click on any control in the dropdown it is getting closed and not allowing me to type.

enter image description here

enter image description here



Solution 1:[1]

I think you would find useful informations here :

https://itnext.io/using-an-angular-directive-to-extend-a-third-party-component-39f0f46a4e0

This uses Renderer2 from Angular : https://angular.io/api/core/Renderer2

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Alain Boudard