-
Notifications
You must be signed in to change notification settings - Fork 102
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
[Switch]: [Property 'checked' does not exist on type 'EventTarget'] #6136
Comments
Hi @22shubham22, |
Fixes #6136
🎉 This issue has been resolved in version v2.0.0-rc.2 🎉 The release is available on v2.0.0-rc.2 Your semantic-release bot 📦🚀 |
Describe the bug
onChange | Fired when the component checked state changes.
Note: Call event.preventDefault() inside the handler of this event to prevent its default action/s.
(event: Ui5CustomEvent<SwitchDomRef, never>) => void
When we assign this type to the event Ui5CustomEvent<SwitchDomRef, never> , we see an error in typescript when we try to access -> event.currentTarget?.checked that says -> Property 'checked' does not exist on type 'EventTarget'
Although , when we console log it , we get the desired value .
Isolated Example
https://stackblitz.com/edit/github-ekiatg?file=src%2FApp.tsx
Reproduction steps
...
Expected Behaviour
No response
Screenshots or Videos
UI5 Web Components for React Version
1.29.0
UI5 Web Components Version
1.24.0
Browser
Chrome
Operating System
Mac
Additional Context
No response
Relevant log output
No response
Organization
No response
Declaration
The text was updated successfully, but these errors were encountered: