web/elements: fix checkbox not being sent correctly
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
232a5a8ad0
commit
5a5a32ff83
|
@ -115,6 +115,8 @@ export class Form<T> extends LitElement {
|
||||||
json[element.name] = values;
|
json[element.name] = values;
|
||||||
} else if (element.tagName.toLowerCase() === "input" && element.type === "date") {
|
} else if (element.tagName.toLowerCase() === "input" && element.type === "date") {
|
||||||
json[element.name] = element.valueAsDate;
|
json[element.name] = element.valueAsDate;
|
||||||
|
} else if (element.tagName.toLowerCase() === "input" && element.type === "checkbox") {
|
||||||
|
json[element.name] = element.checked;
|
||||||
} else {
|
} else {
|
||||||
for (let v = 0; v < values.length; v++) {
|
for (let v = 0; v < values.length; v++) {
|
||||||
form._addSerializedElement(json, element.name, values[v]);
|
form._addSerializedElement(json, element.name, values[v]);
|
||||||
|
|
Reference in New Issue