-
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
ConfirmationDialog: throws TS error in prod build #2953
Comments
Hmmm but that doesn't seem correct. When you use a footer it passes it interface ConfirmDialogOptions {
accept(): void;
reject(): void;
acceptClassName: string;
rejectClassName: string;
acceptLabel: string;
rejectLabel: string;
element: React.ReactNode;
props: ConfirmDialogProps;
[key: string]: any;
} Which is not a |
OK I think the issue needs to be fixed a different way. Can you just try changing this line... type ConfirmDialogTemplateType = React.ReactNode | ((options: ConfirmDialogOptions) => React.ReactNode) to... type ConfirmDialogTemplateType = React.ReactNode | ((options: ConfirmDialogOptions) => React.ReactNode) | ((props: ConfirmDialogProps) => React.ReactNode); |
Tired it. Still getting the same error |
@melloware @michalbujalski having the same issue so created a PR where I changed it to type ConfirmDialogTemplateType = React.ReactNode | ((props: ConfirmDialogProps) => React.ReactNode); and removed the |
@Ruan20795 I made comments on your PR. Your PR won't fix the issue. |
Hi, Sorry for the delayed response! Could you please try #2959 (comment)? |
Describe the bug
When using
ConfirmationDialog
and runningyarn build
the following error is thrown:Changing:
to:
seems to fix the issue
Reproducer
No response
PrimeReact version
8.0.0
React version
18.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
No response
Steps to reproduce the behavior
yarn build
gives out typescript errorExpected behavior
No response
The text was updated successfully, but these errors were encountered: