Skip to content

Commit 1f19862

Browse files
committed
fix(toggle): empty hidden input value when not checked
1 parent 3af4361 commit 1f19862

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/components/toggle/toggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export class Toggle {
186186
}
187187

188188
render() {
189-
renderHiddenInput(this.el, this.name, this.value, this.disabled);
189+
renderHiddenInput(this.el, this.name, (this.checked ? this.value : ''), this.disabled);
190190

191191
return [
192192
<div class="toggle-icon">

0 commit comments

Comments
 (0)