Skip to content

Commit 7e2aa0b

Browse files
authored
fix: default value for checkbox (#15)
Co-authored-by: Richard Herman <[email protected]>
1 parent 977884c commit 7e2aa0b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

dist/sdpi-components.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/pi/sdpi-components.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/checkbox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class Checkbox extends Persisted(Focusable(Checkable(Input<typeof LitElem
2020
html`<input
2121
${ref(this.focusElement)}
2222
type="checkbox"
23-
.checked=${this.value || this.defaultValue || false}
23+
.checked=${this.value ?? this.defaultValue ?? false}
2424
.disabled=${this.disabled}
2525
@change=${(ev: HTMLInputEvent<HTMLInputElement>) => (this.value = ev.target.checked)}
2626
/>`,

0 commit comments

Comments
 (0)