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: 'group' does not exist in type 'ConfirmDialogProps' #6855

Closed
abdullahnazzal opened this issue Jul 9, 2024 · 5 comments · Fixed by #7068 · May be fixed by leoo1992/GeradorQRCode#95
Closed

ConfirmDialog: 'group' does not exist in type 'ConfirmDialogProps' #6855

abdullahnazzal opened this issue Jul 9, 2024 · 5 comments · Fixed by #7068 · May be fixed by leoo1992/GeradorQRCode#95
Assignees
Labels
Typescript Issue or pull request is *only* related to TypeScript definition
Milestone

Comments

@abdullahnazzal
Copy link

abdullahnazzal commented Jul 9, 2024

Describe the bug

Issue 1:
Object literal may only specify known properties, and 'group' does not exist in type 'ConfirmDialogProps'.

confirmDialog({
            group: 'templating',
            header: 'Confirmation',
            message: (
                <div className="flex flex-column align-items-center w-full gap-3 border-bottom-1 surface-border">
                    <i className="pi pi-exclamation-circle text-6xl text-primary-500"></i>
                    <span>Please confirm to proceed moving forward.</span>
                </div>
            ),
            accept,
            reject
        });

Issue 2:

No overload matches this call.
Overload 1 of 2, '(props: ConfirmDialogProps): ConfirmDialog', gave the following error.
Type '{ group: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'.
Property 'group' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'.
Overload 2 of 2, '(props: ConfirmDialogProps, context: any): ConfirmDialog', gave the following error.
Type '{ group: string; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'.
Property 'group' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'.

  <ConfirmDialogPrime group="templating"  />

Reproducer

No response

PrimeReact version

^10.6.5

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@abdullahnazzal abdullahnazzal added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 9, 2024
@melloware
Copy link
Member

@abdullahnazzal what makes you think there is a group property its not listed here: https://primereact.org/confirmdialog/#api.ConfirmDialog.props

@melloware melloware added Status: Needs Reproducer Issue needs a runnable reproducer and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jul 9, 2024
Copy link

github-actions bot commented Jul 9, 2024

Please fork the Stackblitz project and create a case demonstrating your bug report. This issue will be closed if no activities in 20 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 29, 2024
@Mirkesx
Copy link

Mirkesx commented Aug 21, 2024

Sorry for posting on a closed issue, I had the same problem that @abdullahnazzal presented and I'd like to point out one thing, which is probably the real problem here.

@melloware you are correctly pointing out that the props section doesn't list the "group" property, but if you have a look at the documentation it is litterally showing examples of the "group" prop everywhere:

I have one question: is a documentation error or is it a future feature not implemented yet/breaking change from past versions?

Since someone put lot of effort to write that documentation listing the "group" prop, it is either a bug/future feature or it is a copy-paste went wrong from the documentation of another primeface related project.

Either way, the documentation should be fixed, or it should be implemented/restored the support to the "group" prop.

If it is a bug in the documentation of ConfirmDialog, I'd suggest to go through the examples very thoroughly as it seems the examples in the "feature" section are not consistent at all with the list of supported props in the "prop" section: not only they are showing usage of "group", but they also show usage of the "trigger" prop (which is not listed in the "prop" section). Also, the documentation fails in explaining what is the structure of the "configuration object for customization" passed to the "confirmDialog" method, and what are the differences with the list of props the ConfirmDialog components supports.

@melloware
Copy link
Member

let me look through the commits. I see what you are saying now. I will reopen and investigate.

@melloware melloware reopened this Aug 21, 2024
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 21, 2024
@melloware melloware added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Status: Needs Reproducer Issue needs a runnable reproducer labels Aug 21, 2024
melloware added a commit to melloware/primereact that referenced this issue Aug 21, 2024
@melloware melloware added Typescript Issue or pull request is *only* related to TypeScript definition and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Aug 21, 2024
@melloware melloware self-assigned this Aug 21, 2024
@melloware melloware added this to the 10.8.3 milestone Aug 21, 2024
@melloware
Copy link
Member

PR submitted the Typescript was missing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Typescript Issue or pull request is *only* related to TypeScript definition
Projects
None yet
3 participants