Răsfoiți Sursa

修复流程表单中多选按钮最后一个值不能被取消的问题

unknown 5 ani în urmă
părinte
comite
7b5b912fde
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      o2web/source/x_component_process_Xform/Checkbox.js

+ 2 - 2
o2web/source/x_component_process_Xform/Checkbox.js

@@ -123,7 +123,7 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox =  new Class({
 
                 radio.addEvent("click", function(){
                     this.validationMode();
-                    if (this.validation()) this._setBusinessData(this.getInputData("change"));
+                    if (this.validation()) this._setBusinessData(this.getInputData("change") || []);
                 }.bind(this));
 
                 Object.each(this.json.events, function(e, key){
@@ -190,7 +190,7 @@ MWF.xApplication.process.Xform.Checkbox = MWF.APPCheckbox =  new Class({
                 }
             });
         }
-        return (value.length) ? value : null;
+        return (value.length) ? value : [];
     },
     resetData: function(){
         this.setData(this.getValue());