react-polymorph
Advanced tools
Comparing version 0.9.0-rc.7 to 0.9.0-rc.8
@@ -265,3 +265,2 @@ 'use strict'; | ||
caretPosition: changedCaretPosition, | ||
fallbackInputValue: newValue, // render new value as-is | ||
minimumFractionDigits: dynamicMinimumFractionDigits | ||
@@ -283,2 +282,6 @@ }; | ||
var localizedNewNumber = newNumber.toLocaleString(LOCALE, { | ||
minimumFractionDigits: dynamicMinimumFractionDigits | ||
}); | ||
// Case: Dot was added at the end of number | ||
@@ -289,3 +292,3 @@ if (!isDeletion && newValue.charAt(newValue.length - 1) === '.') { | ||
caretPosition: changedCaretPosition, | ||
fallbackInputValue: newValue, | ||
fallbackInputValue: localizedNewNumber + '.', | ||
minimumFractionDigits: 0 | ||
@@ -310,3 +313,2 @@ }; | ||
var localizedNewNumber = newNumber.toLocaleString(LOCALE, numberLocaleOptions); | ||
var hasNumberChanged = value !== newNumber; | ||
@@ -313,0 +315,0 @@ var commasDiff = getNumberOfCommas(localizedNewNumber) - getNumberOfCommas(newValue); |
{ | ||
"name": "react-polymorph", | ||
"description": "React components with highly customizable logic, markup and styles.", | ||
"version": "0.9.0-rc.7", | ||
"version": "0.9.0-rc.8", | ||
"scripts": { | ||
@@ -6,0 +6,0 @@ "build": "cross-env npm run clean && npm run sass && npm run js", |
@@ -250,3 +250,2 @@ // @flow | ||
caretPosition: changedCaretPosition, | ||
fallbackInputValue: newValue, // render new value as-is | ||
minimumFractionDigits: dynamicMinimumFractionDigits, | ||
@@ -268,2 +267,6 @@ }; | ||
const localizedNewNumber = newNumber.toLocaleString(LOCALE, { | ||
minimumFractionDigits: dynamicMinimumFractionDigits, | ||
}); | ||
// Case: Dot was added at the end of number | ||
@@ -274,3 +277,3 @@ if (!isDeletion && newValue.charAt(newValue.length - 1) === '.') { | ||
caretPosition: changedCaretPosition, | ||
fallbackInputValue: newValue, | ||
fallbackInputValue: localizedNewNumber + '.', | ||
minimumFractionDigits: 0, | ||
@@ -295,3 +298,2 @@ }; | ||
const localizedNewNumber = newNumber.toLocaleString(LOCALE, numberLocaleOptions); | ||
const hasNumberChanged = value !== newNumber; | ||
@@ -298,0 +300,0 @@ const commasDiff = getNumberOfCommas(localizedNewNumber) - getNumberOfCommas(newValue); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1633711
10979