CaioQuirinoMedeiros / react-native-currency-input

A simple currency input component for both iOS and Android
https://www.npmjs.com/package/react-native-currency-input
MIT License
158 stars 25 forks source link

wrong value while entering 1 with leading zeros #9

Open iabduul7 opened 3 years ago

iabduul7 commented 3 years ago

https://user-images.githubusercontent.com/24309704/125603528-0c14e638-4545-4dcf-8633-cf20c76a7c8d.mp4

This is the error I am facing, while entering zeros, it is incorrectly behaving

CaioQuirinoMedeiros commented 3 years ago

@iabduul7 can you please share your code?

iabduul7 commented 3 years ago

@iabduul7 can you please share your code?

the same code written in readme file.

<CurrencyInput value={value} onChangeValue={setValue} prefix="$" delimiter="," separator="." precision={2} onChangeText={(formattedValue) => { console.log(formattedValue); // $2,310.46 }} />

lucianojsjr commented 3 years ago

@CaioQuirinoMedeiros Is there any update about this problem?

CaioQuirinoMedeiros commented 3 years ago

I'm sorry but so far I couldn't reproduce this behavior... maybe you guys could provide some more info...

ihsanktmr commented 2 years ago

try to set precision={0}