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

'content' property now required for several components #5701

Closed
rraaij opened this issue Jan 8, 2024 · 1 comment
Closed

'content' property now required for several components #5701

rraaij opened this issue Jan 8, 2024 · 1 comment
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted
Milestone

Comments

@rraaij
Copy link

rraaij commented Jan 8, 2024

Describe the bug

as of version 10.3.0, in component <Dialog> I now get typescript error

Property content is missing in type
{   children: ("" | Element)[];   modal: true;  header: string;   visible: boolean;   onHide: () => void; }
but required in type Readonly<DialogProps>
Overload 2 of 2, (props: DialogProps, context: any): Dialog

Same happens for components <ConfirmDialog> and <Sidebar> (and maybe more, that I haven't seen yet).

Easy fix is to add a 'content={null}' attribute as such:

<Dialog
      modal
      visible={showDialog}
      onHide={hideDialog}
      content={null}
    >...</Dialog>

but it doesn't feel like this should be necessary, especially because the docs say this should be set to null by default.

Reproducer

No response

PrimeReact version

10.3.0

React version

18.x

Language

TypeScript

Build / Runtime

Next.js

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

I shouldn't have to add the content={null} attribute, like it was before.

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

Duplicate: #5692

@melloware melloware added Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 8, 2024
@melloware melloware modified the milestones: 10.3.1, 10.4.0 Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted
Projects
None yet
Development

No branches or pull requests

2 participants