Skip to content

Commit

Permalink
Merge pull request #38 from navedqb/fix--togglebutton-empty-label-render
Browse files Browse the repository at this point in the history
fix empty label render issue in togglebutton
  • Loading branch information
navedqb authored Dec 10, 2024
2 parents 90de32c + c2a5a98 commit 1896c6d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/primeng/src/togglebutton/togglebutton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ export const TOGGLEBUTTON_VALUE_ACCESSOR: any = {
} @else {
<ng-container *ngTemplateOutlet="iconTemplate; context: { $implicit: checked }"></ng-container>
}
@if (onLabel || offLabel) {
<span [ngClass]="cx('label')" [attr.data-pc-section]="'label'">{{ checked ? (hasOnLabel ? onLabel : '') : hasOffLabel ? offLabel : '' }}</span>
}
<span [ngClass]="cx('label')" [attr.data-pc-section]="'label'">{{ checked ? (hasOnLabel ? onLabel : '\u00A0') : hasOffLabel ? offLabel : '\u00A0' }}</span>
}
</span>
</button>
Expand Down

0 comments on commit 1896c6d

Please sign in to comment.