autocomplete dont render selecteditem Templete with multiple=false
Author: KirbylixCreated Aug 14, 2025Updated Sep 8, 2026
LabelsResolution: StaleStatus: Needs Triage
Describe the bug
AutoComplete component with multiple set to false, the selectedItemTemplate is not rendered after selecting an item. This works correctly when multiple=true.
Pull Request Link
No response
Reason for not contributing a PR
- Lack of time
- Unsure how to implement the fix/feature
- Difficulty understanding the codebase
- Other
Other Reason
This issue appears to be related to the template rendering logic for single-selection mode.
Workaround: None found for multiple=false.
Reproducer
https://stackblitz.com/edit/github-d16kd56z-m8fkpq9h?file=src%2Fapp%2Fapp.component.html
Environment
PrimeNG Version: 20.0.1 Angular Version: 20.1.7 Browser(s): Chrome OS: Windows 11
Angular version
20.1.7
PrimeNG version
v20
Node version
22.10.2
Browser(s)
Chrome
Steps to reproduce the behavior
- Create an AutoComplete component with: [(ngModel)] bound to a single object multiple set to false selectedItemTemplate defined in the template
- Search for and select an item.
- Observe the rendered value in the input field.
<p-autocomplete
[(ngModel)]="value1"
[suggestions]="items"
(completeMethod)="search($event)"
[multiple]="false"
>
<ng-template pTemplate="selectedItem" let-item>
Custom selected item label
</ng-template>
</p-autocomplete>Expected behavior
The selectedItemTemplate should be applied to the selected value when multiple=false, similar to how it works when multiple=true.
Source: primefaces/primeng