diff --git a/src/components/checkbox/Checkbox.js b/src/components/checkbox/Checkbox.js index df3c30a..9f06600 100644 --- a/src/components/checkbox/Checkbox.js +++ b/src/components/checkbox/Checkbox.js @@ -59,7 +59,7 @@ export class LeuCheckbox extends LeuElement { @input=${this.handleInput} .checked=${this.checked} ?disabled=${this.disabled} - .value=${this.value} + .value=${this.value ?? ""} /> diff --git a/src/components/checkbox/stories/checkbox.stories.js b/src/components/checkbox/stories/checkbox.stories.js index 43ba765..bc80ea9 100644 --- a/src/components/checkbox/stories/checkbox.stories.js +++ b/src/components/checkbox/stories/checkbox.stories.js @@ -17,9 +17,14 @@ export default { }, } -function Template({ label = "Label", value, checked, disabled }) { +function Template({ label = "Label", value, checked, disabled, name = "" }) { return html` - + ${label} ` diff --git a/src/components/radio/Radio.js b/src/components/radio/Radio.js index 9ec1d7f..6879bd2 100644 --- a/src/components/radio/Radio.js +++ b/src/components/radio/Radio.js @@ -54,7 +54,7 @@ export class LeuRadio extends LeuElement { @input=${this.handleInput} .checked=${this.checked} ?disabled=${this.disabled} - .value=${this.value} + .value=${this.value ?? ""} /> ` diff --git a/src/components/radio/stories/radio.stories.js b/src/components/radio/stories/radio.stories.js index 68e1205..fcd88c5 100644 --- a/src/components/radio/stories/radio.stories.js +++ b/src/components/radio/stories/radio.stories.js @@ -22,9 +22,15 @@ function Template({ value = "", checked = false, disabled = false, + name = "", }) { return html` - + ${label} `