Open Grohden opened 4 years ago
const [a,b] = useState(0) return ( <AmountInput currency='BRL' defaultQuantity={ a } onChangeQuantity={ b } /> )
renders R0.00, when it should render R$0.00 (actually it should be using ',' tho)
The issue is on this line https://github.com/alkafinance/react-native-amount-input/blob/a1ff9f444afb83e31916890ea6be2f1b0065d288/src/AmountInput.tsx#L70
removing the [0] fixes for me, but I'm not sure why it has this index access
[0]
but I'm not sure why it has this index access
now I know, without it the prefix will be prefix0.00. a quick hack is to use
prefix0.00
const [prefix] = formatter.format(0).split('0'); return prefix
renders R0.00, when it should render R$0.00 (actually it should be using ',' tho)
The issue is on this line https://github.com/alkafinance/react-native-amount-input/blob/a1ff9f444afb83e31916890ea6be2f1b0065d288/src/AmountInput.tsx#L70
removing the
[0]
fixes for me, but I'm not sure why it has this index access