From 8aafb257fd20aa40aada891e2a6713a551a3099a Mon Sep 17 00:00:00 2001 From: Faizaan Gagan Date: Thu, 29 Apr 2021 11:02:51 +0530 Subject: [PATCH] DEV: checkbox value should default to false --- .../wizard/initializers/custom-wizard-field.js.es6 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assets/javascripts/wizard/initializers/custom-wizard-field.js.es6 b/assets/javascripts/wizard/initializers/custom-wizard-field.js.es6 index 3ede2b05..0ccb227a 100644 --- a/assets/javascripts/wizard/initializers/custom-wizard-field.js.es6 +++ b/assets/javascripts/wizard/initializers/custom-wizard-field.js.es6 @@ -57,6 +57,12 @@ export default { ]; FieldModel.reopen({ + init() { + this._super(...arguments); + if (this.type === "checkbox") { + this.set("value", this.value || false); + } + }, check() { if (this.customCheck) { return this.customCheck();