Browse Source

Fix normalizeValue in Number input

pull/487/head
Artur Arseniev 9 years ago
parent
commit
a585c7d45e
  1. 2
      dist/grapes.min.js
  2. 3
      src/domain_abstract/ui/InputNumber.js

2
dist/grapes.min.js

File diff suppressed because one or more lines are too long

3
src/domain_abstract/ui/InputNumber.js

@ -224,7 +224,8 @@ module.exports = Input.extend({
value = parseFloat(value);
if (Math.floor(value) !== value) {
stepDecimals = step.toString().split('.')[1].length || 0;
const side = step.toString().split('.')[1];
stepDecimals = side ? side.length : 0;
}
return stepDecimals ? parseFloat(value.toFixed(stepDecimals)) : value;

Loading…
Cancel
Save