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

FloatLabel: Type '{ children: Element[]; }' has no properties in common with type 'IntrinsicAttributes & FloatLabelProps & RefAttributes<HTMLSpanElement>'.ts(2559) #6438

Closed
Thomas-Pilz opened this issue Apr 22, 2024 · 2 comments · Fixed by #6440
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

@Thomas-Pilz
Copy link

Thomas-Pilz commented Apr 22, 2024

Describe the bug

When using the <FloatLabel /> as documented TypeScript will throw the the error Type '{ children: Element[]; }' has no properties in common with type 'IntrinsicAttributes & FloatLabelProps & RefAttributes<HTMLSpanElement>'.ts(2559) which prevents a sucessful application build.

image

Can be reproduced using the officially documented example for the component (linked below).

Reproducer

https://stackblitz.com/edit/bphtke?file=src%2FApp.tsx

PrimeReact version

10.6.3

React version

18.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Create an input field and associated label
  2. Wrap both elements in <FloatLabel />
  3. Error occurs

Expected behavior

<FloatLabel /> should not error here and/ or proper usage should be correctly documented.

@Thomas-Pilz Thomas-Pilz 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 22, 2024
@Rekl0w
Copy link
Contributor

Rekl0w commented Apr 22, 2024

Your stackblitz link is not working, can you provide a working link please ?

@Thomas-Pilz
Copy link
Author

Your stackblitz link is not working, can you provide a working link please ?

Sorry, my bad. Should work now.

@melloware melloware added Typescript Issue or pull request is *only* related to TypeScript definition and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Apr 22, 2024
@melloware melloware added this to the 10.6.4 milestone Apr 22, 2024
@nitrogenous nitrogenous added the Type: Bug Issue contains a defect related to a specific component. label Apr 30, 2024
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
Development

Successfully merging a pull request may close this issue.

4 participants