Roo/bootstrap/form/MultiLineTag.js
authorleon <leon@roojs.com>
Wed, 1 Nov 2023 08:44:19 +0000 (16:44 +0800)
committerleon <leon@roojs.com>
Wed, 1 Nov 2023 08:44:19 +0000 (16:44 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/form/MultiLineTag.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index adc44b7..ed30bc2 100644 (file)
@@ -211,9 +211,9 @@ Roo.extend(Roo.bootstrap.form.MultiLineTag, Roo.bootstrap.form.Input,  {
         //     this.tagRows[i].inputCb.setRawValue(arr[i][this.valueField]);
         // }
 
-        Roo.log(this.tagRows.length);
+        var oldTotal = this.tagRows.length;
 
-        for(var i = 0; i < this.tagRows.length; i ++) {
+        for(var i = 0; i < this.oldTotal; i ++) {
             this.removeTagRow(this.tagRows[0]);
         }
         
index ee50812..b1cbb5d 100644 (file)
@@ -14965,9 +14965,9 @@ Roo.extend(Roo.bootstrap.form.MultiLineTag, Roo.bootstrap.form.Input,  {
         //     this.tagRows[i].inputCb.setRawValue(arr[i][this.valueField]);
         // }
 
-        Roo.log(this.tagRows.length);
+        var oldTotal = this.tagRows.length;
 
-        for(var i = 0; i < this.tagRows.length; i ++) {
+        for(var i = 0; i < this.oldTotal; i ++) {
             this.removeTagRow(this.tagRows[0]);
         }
         
index c7a50c9..ecee9c6 100644 (file)
@@ -633,7 +633,7 @@ Roo.bootstrap.form.MultiLineTag=function(A){Roo.bootstrap.form.MultiLineTag.supe
 });},'select':function(E,F,G){A.fireEvent('change',A,A.getValue(),false);}}});var C=Roo.factory({xns:Roo.bootstrap,xtype:'Button',html:'-'});var D={xns:Roo.bootstrap,xtype:'Row',items:[B,C],listeners:{'render':function(E){this.inputCb=B;this.removeBtn=C;this.removeBtn.on('click',function(){A.removeTagRow(E);
 });}}};this.tagRows.push(this.addxtype(D));A.showHideRemoveBtn();},shouldAutoAddTagRow:function(){var A=true;Roo.each(this.tagRows,function(r){if(r.inputCb.getRawValue()==''){A=false;}});return A;},removeTagRow:function(A){A.destroy();this.tagRows.splice(this.tagRows.indexOf(A),1);
 this.fireEvent('change',this,this.getValue(),false);this.showHideRemoveBtn();},showHideRemoveBtn:function(){var A=this;Roo.each(this.tagRows,function(r){r.removeBtn.show();if(A.tagRows.length<=A.minimumRow){r.removeBtn.hide();}});},getValue:function(){var A=this;
-var B=[];Roo.each(A.tagRows,function(r){var C=r.inputCb.getRawValue();if(C!=''){var D={};D[A.valueField]=r.inputCb.getRawValue();B.push(D);}});return JSON.stringify(B);},setValue:function(A){Roo.log(this.tagRows.length);for(var i=0;i<this.tagRows.length;i++){this.removeTagRow(this.tagRows[0]);
+var B=[];Roo.each(A.tagRows,function(r){var C=r.inputCb.getRawValue();if(C!=''){var D={};D[A.valueField]=r.inputCb.getRawValue();B.push(D);}});return JSON.stringify(B);},setValue:function(A){var B=this.tagRows.length;for(var i=0;i<this.oldTotal;i++){this.removeTagRow(this.tagRows[0]);
 }}});
 // Roo/data/SortTypes.js
 Roo.data.SortTypes={none:function(s){return s;},stripTagsRE:/<\/?[^>]+>/gi,asText:function(s){return String(s).replace(this.stripTagsRE,"");},asUCText:function(s){return String(s).toUpperCase().replace(this.stripTagsRE,"");},asUCString:function(s){return String(s).toUpperCase();