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

OverlayPanel: incorrect type definitions for show/hide arguments #1356

Closed
VsevolodGolovanov opened this issue Apr 30, 2020 · 0 comments
Closed
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@VsevolodGolovanov
Copy link

VsevolodGolovanov commented Apr 30, 2020

I'm submitting a ... (check one with "x")

[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Current behavior
Valid method calls are marked as erroneous due to typings.
image

The problems are...

  1. Both show arguments are required and don't accept null or undefined.
  2. toggle declares only the event argument, when it should have target too.

Expected behavior
Typings should allow correct calls: specifying event, but not target; and vice versa.

This goes beyong typings, but IMHO due to the XORy nature of the arguments, the best API would be one argument: eventOrTarget: SyntheticEvent | EventTarget.

Minimal reproduction of the problem with instructions

Please tell us about your environment:

  • React version:
    16.13.1.

  • PrimeReact version:
    4.1.2.

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
    TypeScript 3.8.3.
@mertsincan mertsincan added this to the 6.2.2 milestone Apr 11, 2021
@mertsincan mertsincan added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Apr 11, 2021
@mertsincan mertsincan self-assigned this Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants