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: wrong typing for onClick event of navigatorTemplate #2844

Closed
AndrewZagovora opened this issue May 5, 2022 · 4 comments · Fixed by #2848
Closed

Calendar: wrong typing for onClick event of navigatorTemplate #2844

AndrewZagovora opened this issue May 5, 2022 · 4 comments · Fixed by #2848
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

@AndrewZagovora
Copy link
Contributor

Describe the bug

Month and Year navigation templates have onClick method with 2 arguments expected
https://github.com/primefaces/primereact/blob/master/components/lib/calendar/Calendar.js

image

But in the types ther is only one argumen which is object
https://github.com/primefaces/primereact/blob/master/components/lib/calendar/Calendar.d.ts

image

Please can you fix this issue in both 7 and 8 version.

Best regards,
Andrii

Reproducer

No response

PrimeReact version

7.2.1

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@AndrewZagovora AndrewZagovora added the Type: Bug Issue contains a defect related to a specific component. label May 5, 2022
@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 May 5, 2022
@melloware
Copy link
Member

Is that the same as this issue: #2646 ??

Do you have a fix to submit a a PR for?

@AndrewZagovora
Copy link
Contributor Author

Hello @melloware! Yesm looks the same. I will create pull request, the fix should be easy.

@melloware
Copy link
Member

cool i will review

@melloware melloware added this to the 8.1.0 milestone May 5, 2022
AndrewZagovora pushed a commit to AndrewZagovora/primereact that referenced this issue May 5, 2022
@AndrewZagovora
Copy link
Contributor Author

@melloware You can review :-)
Thanks in advance.

@melloware melloware linked a pull request May 5, 2022 that will close this issue
melloware pushed a commit that referenced this issue May 5, 2022
Co-authored-by: andrii.zagovora <[email protected]>
@mertsincan mertsincan modified the milestones: 8.1.0, 8.1 May 12, 2022
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label May 12, 2022
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.

3 participants