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

MultiSelect: pTemplate selectedItems does not work #17063

Open
delrem32 opened this issue Dec 16, 2024 · 0 comments
Open

MultiSelect: pTemplate selectedItems does not work #17063

delrem32 opened this issue Dec 16, 2024 · 0 comments
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Milestone

Comments

@delrem32
Copy link

delrem32 commented Dec 16, 2024

Describe the bug

When pTemplate="selectedItems" is defined, the multiselect ignores it.

<p-multiselect
  [options]="countries"
  [(ngModel)]="selectedCountries"
  optionLabel="name"
  placeholder="Select Countries"
  display="chip"
  appendTo="body"
>
  <ng-template let-selectedCountries pTemplate="selectedItems"> //<--Always ignored
    <div *ngFor="let country of selectedCountries">
      {{ 'TEST' + country.name }}
    </div>
  </ng-template>
  <ng-template let-country pTemplate="item">
    <div>
      <div>{{ 'TEST INNER ITEM ' + country.name }}</div>
    </div>
  </ng-template>
</p-multiselect>

image

Environment

ng18, primeng18

Reproducer

https://stackblitz.com/edit/github-wcuxbgyk-b2wvspkg

Angular version

18

PrimeNG version

18

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.11

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

Selected items template should be defined regarding pTemplate='selectedItems'

@delrem32 delrem32 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 16, 2024
@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 16, 2024
@mertsincan mertsincan added this to the 18.0.1 milestone Dec 16, 2024
@github-project-automation github-project-automation bot moved this to Review in PrimeNG Dec 16, 2024
@mehmetcetin01140 mehmetcetin01140 modified the milestones: 18.0.1, 19.0.1 Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
Status: Review
Development

No branches or pull requests

3 participants