Skip to content

Commit

Permalink
15784 fix CheckIcon is taking precedence over templates, and error on…
Browse files Browse the repository at this point in the history
… just having checkicon template
  • Loading branch information
pete-mcwilliams committed Jun 4, 2024
1 parent 0da7497 commit 8eac39f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/components/multiselect/multiselect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ export const MULTISELECT_VALUE_ACCESSOR: any = {
<div class="p-checkbox p-component" [ngClass]="{ 'p-variant-filled': config.inputStyle() === 'filled' }">
<div class="p-checkbox-box" [ngClass]="{ 'p-highlight': selected }">
<ng-container *ngIf="selected">
<CheckIcon *ngIf="!checkIconTemplate || !itemCheckboxIconTemplate" [styleClass]="'p-checkbox-icon'" [attr.aria-hidden]="true" />
<CheckIcon *ngIf="!checkIconTemplate && !itemCheckboxIconTemplate" [styleClass]="'p-checkbox-icon'" [attr.aria-hidden]="true" />
<span *ngIf="checkIconTemplate" class="p-checkbox-icon" [attr.aria-hidden]="true">
<ng-template *ngTemplateOutlet="checkIconTemplate && !itemCheckboxIconTemplate"></ng-template>
<ng-template *ngTemplateOutlet="checkIconTemplate"></ng-template>
</span>
<span *ngIf="itemCheckboxIconTemplate" class="p-checkbox-icon" [attr.aria-hidden]="true">
<ng-template *ngTemplateOutlet="itemCheckboxIconTemplate; context: { $implicit: selected }"></ng-template>
</span>
</ng-container>
Expand Down

0 comments on commit 8eac39f

Please sign in to comment.