You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 .
Hi @22shubham22,
thanks for reaching out! Is there any specific reason why you need to use currentTarget instead of target? Our type definition adds the types of the UI5 Web Component to the target property of the custom event, but not to the currentTarget as the event might bubble up from somewhere else.
We'll add the types for currentTarget.
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: