onBlur/onFocus's event argument should be typed as FocusEvent #2009
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")
Codesandbox Case (Bug Reports)
Current behavior
onBlur/onFocus's event argument is typed as FormEvent for some components. This hides focus related event fields.
Components that inherit these callback properties from native input types don't have this problem. The affected components are the ones that declare the handlers themselves. Namely the following: AutoComplete, Calendar, Chips, Dropdown, InputMask, InputNumber, InputSwitch, MultiSelect, ToggleButton.
Expected behavior
onBlur/onFocus's event argument should be typed as FocusEvent. This allows access to the
target
andrelatedTarget
fields. This is what it's typed as in native input type definitions.Minimal reproduction of the problem with instructions
Please tell us about your environment:
React version:
17.0.2
PrimeReact version:
6.3.1
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 ]
TS 4.2.4
The text was updated successfully, but these errors were encountered: