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

Calendar: Typescript error in passthrough type definition #7015

Closed
ivanpajon opened this issue Aug 9, 2024 · 3 comments · Fixed by #7021 · May be fixed by leoo1992/GeradorQRCode#95
Closed

Calendar: Typescript error in passthrough type definition #7015

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

Comments

@ivanpajon
Copy link
Contributor

Describe the bug

Related to PR 6938

Reproducer

https://stackblitz.com/edit/6e7v8n?file=src%2Fmain.tsx

System Information

  • System:

    OS: Windows 11 10.0.22631
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i9-12900HK
    Memory: 33.95 GB / 63.71 GB

  • Binaries:

    Node: 22.4.1 - ~\AppData\Local\nvs\default\node.EXE
    npm: 10.8.1 - ~\AppData\Local\nvs\default\npm.CMD
    pnpm: 9.6.0 - ~\AppData\Local\pnpm\pnpm.CMD

  • Browsers:

    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527

  • npmPackages:

    react: 18.3.1 => 18.3.1

Steps to reproduce the behavior

  1. Go to reproducer
  2. Check comments in main.tsx and App.tsx

Expected behavior

Calendar with proper types definitions and updated docs for unstyled mode

@ivanpajon ivanpajon 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 9, 2024
@melloware
Copy link
Member

Same as the other one. The typescript is now correct it could be the tailwind theme that is wrong.

@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 Aug 10, 2024
@melloware melloware self-assigned this Aug 10, 2024
@melloware melloware added this to the 10.8.3 milestone Aug 10, 2024
@melloware
Copy link
Member

melloware commented Aug 10, 2024

You are right looking through the code the Typescript for different components uses a strange mix. i am actually wondering if the correct type is...

 input?: CalendarPassThroughType<InputTextProps>;

it was previously this but its not an HTMLInputText its an actual PrimeReact InputText.

 input?: CalendarPassThroughType<React.HTMLAttributes<HTMLInputElement>>;

@ivanpajon
Copy link
Contributor Author

ivanpajon commented Aug 10, 2024

In file App.tsx of reproducer there is a console.log. If you see the output of getInput function it returns an HTMLInputElement. This is why I beleive it was fine previously (as input?: CalendarPassThroughType<React.HTMLAttributes<HTMLInputElement>>;).

melloware pushed a commit that referenced this issue Aug 11, 2024
* fix: Calendar passthrough type definition

* fix: Calendar unstyled theme doc

* fix: Calendar passthrough type definition

* fix: Calendar unstyled theme doc
@melloware melloware assigned ivanpajon and unassigned melloware Aug 11, 2024
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
2 participants