Browse Source

KERNEL-12705 fix: bi.number_editor validationChecker 修复

es6
zsmj 2 years ago
parent
commit
4201f980b0
  1. 5
      src/widget/numbereditor/number.editor.js

5
src/widget/numbereditor/number.editor.js

@ -33,10 +33,11 @@ BI.NumberEditor = BI.inherit(BI.Widget, {
value: o.valueFormatter(o.value),
validationChecker: function (v) {
// 不设置validationChecker就自动检测
if(o.validationChecker === BI.emptyFn && !self._checkValueInRange(v)) {
var parsedValue = o.valueParser(v);
if (o.validationChecker === BI.emptyFn && !self._checkValueInRange(parsedValue)) {
return false;
}
return o.validationChecker(v);
return o.validationChecker(parsedValue);
},
errorText: o.errorText
});

Loading…
Cancel
Save