Revert the checked state of a checkbox if an error occured
This commit is contained in:
parent
6eb0964322
commit
b6d69e0f10
@ -22,6 +22,9 @@
|
||||
|
||||
### Code
|
||||
|
||||
- Changer
|
||||
- Revert the checked state of a checkbox if an error occured
|
||||
|
||||
- Form
|
||||
- Migrate missing input fields to BrickChanger
|
||||
|
||||
|
@ -174,6 +174,11 @@ class BrickChanger {
|
||||
console.log(error.message);
|
||||
|
||||
this.status_error(error.message);
|
||||
|
||||
// Reverse the checked state
|
||||
if (this.html_type == "checkbox") {
|
||||
this.html_element.checked = !this.html_element.checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user