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

onBlur/onFocus's event argument should be typed as FocusEvent #2009

Closed
VsevolodGolovanov opened this issue May 4, 2021 · 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 May 4, 2021

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

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 and relatedTarget 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 ]

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
    TS 4.2.4
@mertsincan mertsincan self-assigned this May 5, 2021
@mertsincan mertsincan added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label May 5, 2021
@mertsincan mertsincan added this to the 6.3.2 milestone May 5, 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