Skip to content

Commit

Permalink
added lib file
Browse files Browse the repository at this point in the history
  • Loading branch information
Sudhanshu Yadav authored and Sudhanshu Yadav committed Mar 30, 2021
1 parent c822404 commit f9e1305
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/number_format.js
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ function (_React$Component) {
var leftBound = !!format ? 0 : prefix.length;
var rightBound = lastValue.length - (!!format ? 0 : suffix.length);

if (value.length > lastValue.length || !value.length || start === end || selectionStart === 0 && selectionEnd === lastValue.length || selectionStart === leftBound && selectionEnd === rightBound) {
if (value.length > lastValue.length || !value.length || start === end || selectionStart === 0 && selectionEnd === lastValue.length || start === 0 && end === lastValue.length || selectionStart === leftBound && selectionEnd === rightBound) {
return value;
} //if format got deleted reset the value to last value

Expand Down

0 comments on commit f9e1305

Please sign in to comment.