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 documentation says acceptIcon and rejectIcon default values are null, but source code specifies default values #10430

Closed
Bobington12 opened this issue Jul 20, 2021 · 0 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@Bobington12
Copy link

I'm submitting a ...
[X ] bug report

Plunkr Case (Bug Reports)
https://stackblitz.com/edit/primeng-confirmdialog-demo?file=src%2Fapp%2Fapp.component.html

Current behavior
The documentation for p-confirmDialog says acceptIcon and rejectIcon have a default value of null.
In the source code for confirmDialog lines 82 and 90 (as of version 12.0.1), the code "@input acceptIcon: string = 'pi pi-check';" means it will use that value if the input is null, which contradicts the documentation.

Expected behavior
It depends on what the expectation is for this component. Should the button icons be default or not? Either:

  • The source code should be changed to "@input() acceptIcon: string;" and @input() rejectIcon: string;" to properly accept null values (No icons by default).
  • The documentation is incorrect and 'pi pi-check' and 'pi pi-times' should be the documented default values for 'acceptIcon' and 'rejectIcon', respectively (Icons by default).

Minimal reproduction of the problem with instructions
This can be seen in the example code of the documentation (linked in Plunkr section). Not specifying acceptIcon or rejectIcon parameters in p-confirmDialog still display icons.

What is the motivation / use case for changing the behavior?
The documentation incorrectly cites the source code. This change should be reviewed to improve consistency and clarity.

@yigitfindikli yigitfindikli self-assigned this Jul 20, 2021
@yigitfindikli yigitfindikli added this to the 12.0.1 milestone Jul 20, 2021
@yigitfindikli yigitfindikli added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Jul 20, 2021
@yigitfindikli yigitfindikli modified the milestones: 12.0.1, 12.Future Aug 3, 2021
@yigitfindikli yigitfindikli added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add labels Feb 11, 2022
@yigitfindikli yigitfindikli modified the milestones: 13.Future, 13.1.2 Feb 11, 2022
@cetincakiroglu cetincakiroglu removed the Status: Pending Review Issue or pull request is being reviewed by Core Team label Feb 11, 2022
@yigitfindikli yigitfindikli added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Feb 11, 2022
yigitfindikli added a commit that referenced this issue Feb 11, 2022
Fixed #10430 - confirmDialog | acceptIcon and rejectIcon default valu…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

3 participants