The Lit checkbox component incorrectly uses .value instead of .checked for rendering and event handling, causing the checkbox to never display its checked state and write incorrect values to the data model.
Bug Location
- File:
renderers/lit/src/0.8/ui/checkbox.ts
- Lines: 96, 100
Current (Broken) Behavior
// Line 100 - Sets string value, NOT checked state
.value=${value}
// Line 96 - Reads string value, NOT checked state
this.#setBoundValue(evt.target.value);
Problems:
.value=${true} sets inputElement.value = "true" (string) but does NOT visually check the checkbox
evt.target.value returns the same string on every click, regardless of checked/unchecked state
- Data model receives string instead of boolean, corrupting the expected type
Expected Behavior (per Angular reference implementation)
// Angular checkbox.ts:32 - Correct
[checked]="inputChecked()"
// Angular checkbox.ts:71 - Correct
event.target.checked