Description
The Checkbox component crashes when clicked due to Object.assign(event, { target: ... }) in the onCheckedChange handler. Event.target is a read-only getter property and cannot be set via Object.assign.
Error
Uncaught TypeError: Cannot set property target of #<Event> which has only a getter
at Object.assign (<anonymous>)
at Object.onCheckedChange (@cloudflare_kumo.js:4043:32)
Steps to Reproduce
- Render a
<Checkbox> component
- Click on it
- The
onCheckedChange handler throws
Environment
@cloudflare/kumo v1.18.0
- React 19.2.4
- Chrome (latest)
Expected Behavior
Checkbox should toggle without errors.
Actual Behavior
Throws TypeError: Cannot set property target of #<Event> which has only a getter on every click. The checkbox state does not change.
Description
The
Checkboxcomponent crashes when clicked due toObject.assign(event, { target: ... })in theonCheckedChangehandler.Event.targetis a read-only getter property and cannot be set viaObject.assign.Error
Steps to Reproduce
<Checkbox>componentonCheckedChangehandler throwsEnvironment
@cloudflare/kumov1.18.0Expected Behavior
Checkbox should toggle without errors.
Actual Behavior
Throws
TypeError: Cannot set property target of #<Event> which has only a getteron every click. The checkbox state does not change.