-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 onHide type definition doesn't match runtime behavior #7684
Comments
@reponemec i submitted a PR to fix it so it actually returns the type matching the Typescript it should just be a single string "accept" or "reject". It should not be an ARRAY. |
After updating to PrimeReact version 10.9.2, I've observed that the type of the
Is this behavior intentional and final? |
No that is not intentional it should be a single string of either |
@reponemec thanks for the report just submitted PR to fix ESC/Close to report |
ConfirmDialog onHide type definition doesn't match runtime behavior
The type definition for ConfirmDialog's onHide callback doesn't match its runtime behavior.
According to confirmdialog.d.ts, onHide is defined as:
However, at runtime, the callback receives an array containing an object with a result property:
This causes TypeScript errors when trying to properly type the onHide callback handler.
To reproduce:
Current workaround:
Expected behavior:
The type definition should match the actual runtime behavior.
Environment:
"primereact": "^10.8.3"
"react": "^18.3.1"
"typescript": "^5.2.2"
The text was updated successfully, but these errors were encountered: