OverlayPanel: incorrect type definitions for show/hide arguments #1356
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
I'm submitting a ... (check one with "x")
Current behavior
Valid method calls are marked as erroneous due to typings.
The problems are...
show
arguments are required and don't acceptnull
orundefined
.toggle
declares only theevent
argument, when it should havetarget
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 ]
TypeScript 3.8.3.
The text was updated successfully, but these errors were encountered: