primeng icon indicating copy to clipboard operation
primeng copied to clipboard

feat(p-multiselect): add template to customize the dropdown

Open sandrotonon opened this issue 1 year ago • 1 comments

See discussion #2157

Usage

If provided, the dropdown template replaces the whole input component. Clicking the templates content triggers the visibility of the multiselect-overlaypanel. It also maintains full keyboard-control.

Example Code

<p-multiselect
  [options]="countries"
  [(ngModel)]="selectedCountries"
  placeholder="Select Countries"
  optionLabel="name">
    <ng-template let-value pTemplate="dropdown">
        <p-button icon="pi pi-flag-fill" severity="secondary"></p-button>
    </ng-template>
</p-multiselect>

Outcome

preview

sandrotonon avatar Jun 17 '24 13:06 sandrotonon

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
primeng ⬜️ Ignored (Inspect) Visit Preview Jun 17, 2024 1:37pm

vercel[bot] avatar Jun 17 '24 13:06 vercel[bot]

Thanks a lot for your contribution! Could you please update your PR and create an issue? Thank you!

mertsincan avatar Nov 18 '24 13:11 mertsincan

Since the PR was not able to merge automatically, I decided to close it. Maybe I will reopen a new PR, if I manage to find some time.

sandrotonon avatar Nov 20 '24 08:11 sandrotonon