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

StepperPanel: New const instead of class components are no valid JSX.Element's #6334

Closed
dvpritzbuer opened this issue Apr 8, 2024 · 9 comments · Fixed by #6356, leoo1992/GeradorQRCode#23 or leoo1992/GeradorQRCode#27
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component. Typescript Issue or pull request is *only* related to TypeScript definition
Milestone

Comments

@dvpritzbuer
Copy link
Contributor

Describe the bug

"JSX element type 'Stepper' does not have any construct or call signatures."

"ERROR(TypeScript) 'StepperPanel' cannot be used as a JSX component.
Its type 'Component<StepperPanelProps, any, any>' is not a valid JSX element type."

Reproducer

https://stackblitz.com/edit/vitejs-vite-9mym3z?file=src%2FApp.tsx,package.json

PrimeReact version

10.6.2

React version

18.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@dvpritzbuer dvpritzbuer added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 8, 2024
@melloware melloware changed the title New const instead of class components are no valid JSX.Element's StepperPanel: New const instead of class components are no valid JSX.Element's Apr 8, 2024
@melloware
Copy link
Member

I think i fixed it with this: #6325

@melloware melloware added Resolution: Needs More Information More information about the issue is needed to find a correct solution Status: In Progress Core Team is working on the issue or pull request and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Resolution: Needs More Information More information about the issue is needed to find a correct solution labels Apr 8, 2024
@melloware melloware added this to the 10.6.3 milestone Apr 8, 2024
@gucal gucal removed this from the 10.6.3 milestone Apr 9, 2024
@gucal
Copy link
Contributor

gucal commented Apr 9, 2024

Hi,

With release 10.6.3 the issue should be fixed. If you notice that the issue persists, please ping me.

@gucal gucal closed this as completed Apr 9, 2024
@dvpritzbuer
Copy link
Contributor Author

dvpritzbuer commented Apr 9, 2024

@gucal
Problem is not solved yet, still the same error with 10.6.3.

I've updated the stackblitz: https://stackblitz.com/edit/vitejs-vite-9mym3z?file=src%2FApp.tsx

@dvpritzbuer
Copy link
Contributor Author

What about the following type definition?
declare const StepperPanel: React.FC<React.PropsWithChildren<StepperPanelProps>>;

That works locally for me and should be a proper type.

@melloware
Copy link
Member

@dvpritzbuer do you want to submit a PR by any chance?

@melloware melloware reopened this Apr 9, 2024
@melloware melloware added this to the 10.6.4 milestone Apr 9, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: In Progress Core Team is working on the issue or pull request labels Apr 9, 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 Apr 9, 2024
@dvpritzbuer
Copy link
Contributor Author

@melloware yes, I can do that

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

OK i assigned to you!

@dvpritzbuer
Copy link
Contributor Author

@melloware
Can't push my branch "issue-6334" with "remote: Permission to primefaces/primereact.git denied to dvpritzbuer."
Is it on my side or do you need to give me permissions?

@melloware
Copy link
Member

@melloware melloware added Typescript Issue or pull request is *only* related to TypeScript definition and removed Type: Bug Issue contains a defect related to a specific component. labels Apr 9, 2024
melloware pushed a commit that referenced this issue Apr 16, 2024
* fix: typescript definition for Stepper and StepperPanel components

* added type StepperRefAttributes for proper ref methods type definition of Stepper

* added type StepperRefAttributes for proper ref methods type definition of Stepper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component. Typescript Issue or pull request is *only* related to TypeScript definition
Projects
None yet
4 participants