Skip to content

Commit

Permalink
fix primefaces#5185, InputNumber: Minus Sign not working for Currency…
Browse files Browse the repository at this point in the history
… INR
  • Loading branch information
akshayantony55 committed Oct 29, 2023
1 parent f51d45f commit c764c35
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/lib/inputnumber/InputNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,11 @@ export const InputNumber = React.memo(
_suffix.current.lastIndex = 0;
let currencyCharIndex = val.search(_currency.current);

if(currencyCharIndex === 0 && _currency.current.toString() === '/[INR]/g'){
currencyCharIndex = 3
if (currencyCharIndex === 0 && _currency.current.toString() === '/[INR]/g') {
currencyCharIndex = 3;
}

_currency.current.lastIndex = 0;

return { decimalCharIndex, minusCharIndex, suffixCharIndex, currencyCharIndex };
};
Expand Down

0 comments on commit c764c35

Please sign in to comment.