diff --git a/CHANGELOG.md b/CHANGELOG.md index ccda8e22..d0e86590 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 4.60.2 ( May 30th, 2024) + +### Fixed + +- Issue where formatting in react native with number formatter would not allow user to type a decimal "2." + ## 4.60.1 ( May 28th, 2024) ### Fixed diff --git a/src/utils.js b/src/utils.js index c5dca542..6c4cc8f4 100644 --- a/src/utils.js +++ b/src/utils.js @@ -721,7 +721,10 @@ export const informedFormatter = (val, frmtr, old, full) => { // Special case, we want to diable keeping suffix on backspace in react native if ( typeof navigator !== 'undefined' && - navigator.product === 'ReactNative' + navigator.product === 'ReactNative' && + value && + old && + value.length < old.length ) { // I'm in react-native formattedString = formattedString.slice(0, suffixStart);