Roo/form/NumberField.js
authorAlan <alan@roojs.com>
Tue, 26 Mar 2024 08:50:38 +0000 (16:50 +0800)
committerAlan <alan@roojs.com>
Tue, 26 Mar 2024 08:50:38 +0000 (16:50 +0800)
Roo/form/NumberField.js

index ce1f025..9d7cb1d 100644 (file)
@@ -138,11 +138,9 @@ Roo.extend(Roo.form.NumberField, Roo.form.TextField,  {
 
     setValue : function(v){
         v = this.fixPrecision(v);
-        if(!this.allowDecimals || this.decimalPrecision == -1 || nan || !value){
-            //noop 
-        } else {
+        if(this.thousandSeparator != ''){
             v = Roo.util.Format.number(v, this.decimalPrecision, this.thousandSeparator);
-        }
+        } 
         Roo.form.NumberField.superclass.setValue.call(this, String(v).replace(".", this.decimalSeparator));
     },