confirmDialog documentation says acceptIcon and rejectIcon default values are null, but source code specifies default values #10430
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
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:
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.
The text was updated successfully, but these errors were encountered: