Skip to content

Commit

Permalink
Merge pull request #15785 from pete-mcwilliams/15784
Browse files Browse the repository at this point in the history
Fixed #15784 fix CheckIcon is taking precedence over templates, and error on just having checkicon template
  • Loading branch information
cetincakiroglu authored Jun 13, 2024
2 parents 6526f40 + 8eac39f commit 9807d5b
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 9807d5b

Please sign in to comment.