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
{{ message }}
Repository navigation
event["target"]["checked"] does not exist for checkbox inputs #1070
@rmorshea Is there a chance there's a better way of doing this? I'm not seeing anywhere within preact's source code where they statically define event contents like this.
I found that when adding checked: element.checked, a TypeScript error appears stating that "Property 'checked' does not exist on type 'HTMLButtonElement', may need to find another workaround.
Activity
rmorshea commentedon Jun 19, 2023
I think that can be fixed right here by adding
checked: element.checked.Archmonger commentedon Jun 19, 2023
@rmorshea Is there a chance there's a better way of doing this? I'm not seeing anywhere within
preact's source code where they statically define event contents like this.DennisHC commentedon Jul 29, 2023
BUTTON: (element: HTMLInputElement) => ({ value: element.value, checked: element.checked }),I found that when adding
checked: element.checked, a TypeScript error appears stating that "Property 'checked' does not exist on type 'HTMLButtonElement', may need to find another workaround.DennisHC commentedon Jul 30, 2023
Proposed change:
INPUT: (element: HTMLInputElement) => ({ value: element.value, checked: element.checked })Since the issue is referred to the checkboxes needing a
checkedattribute, I believe this may fix it here.rmorshea commentedon Jul 30, 2023
That seems correct to me.