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

ConfirmDialog: Accept Icon is duplicated #13022

Closed
denny99 opened this issue May 11, 2023 · 1 comment
Closed

ConfirmDialog: Accept Icon is duplicated #13022

denny99 opened this issue May 11, 2023 · 1 comment
Assignees
Labels
LTS-FIXED-15.4.3 Fixed in PrimeNG LTS 15.4.3 LTS-PORTABLE Type: Bug Issue contains a bug related to a specific component. Something about the component is not working

Comments

@denny99
Copy link
Contributor

denny99 commented May 11, 2023

Describe the bug

Well pretty simple:

Heres the buggy code piece

[icon]="option('acceptIcon')"
:

<button
                        type="button"
                        pRipple
                        pButton
                        [icon]="option('acceptIcon')"
                        [label]="acceptButtonLabel"
                        (click)="accept()"
                        [ngClass]="'p-confirm-dialog-accept'"
                        [class]="option('acceptButtonStyleClass')"
                        *ngIf="option('acceptVisible')"
                        [attr.aria-label]="acceptAriaLabel"
                    >
                        <ng-container *ngIf="!acceptIconTemplate">
                            <i *ngIf="option('acceptIcon')" [class]="option('acceptIcon')"></i>
                            <CheckIcon *ngIf="!option('acceptIcon')" [styleClass]="'p-button-icon-left'"/>
                        </ng-container>
                        <span *ngIf="acceptIconTemplate" class="p-button-icon-left">
                            <ng-template *ngTemplateOutlet="acceptIconTemplate"></ng-template>
                        </span>
                    </button>

As you can see with the addition of icon template, the icon is now duplicated. With the new i element and also with the icon attribute on the button itself. Thats not the case for the reject button.

Environment

Angular with Nest Backend on MacOS

Reproducer

No response

Angular version

15.x

PrimeNG version

15.4.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

16.x

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

Just remove the single line

@denny99 denny99 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label May 11, 2023
denny99 pushed a commit to denny99/primeng that referenced this issue May 11, 2023
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels May 16, 2023
@cetincakiroglu cetincakiroglu added this to the 16.0.0 milestone May 16, 2023
@cetincakiroglu cetincakiroglu self-assigned this May 18, 2023
@gucal gucal added the LTS-FIXED-15.4.3 Fixed in PrimeNG LTS 15.4.3 label May 18, 2023
@cetincakiroglu cetincakiroglu modified the milestones: 16.0.0-rc.2, 16.0.0 May 19, 2023
@cetincakiroglu
Copy link
Contributor

Hi @denny99 ,

Thanks for reporting the issue, it seems the issue has already been fixed between 15.4.2-16.0.0-rc.2.
Closing the issue.

@cetincakiroglu cetincakiroglu removed this from the 16.0.0 milestone May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-FIXED-15.4.3 Fixed in PrimeNG LTS 15.4.3 LTS-PORTABLE Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants