react-native-currency-input icon indicating copy to clipboard operation
react-native-currency-input copied to clipboard

wrong value while entering 1 with leading zeros

Open iabduul7 opened this issue 3 years ago • 5 comments

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

iabduul7 avatar Jul 14 '21 10:07 iabduul7

@iabduul7 can you please share your code?

CaioQuirinoMedeiros avatar Jul 14 '21 16:07 CaioQuirinoMedeiros

@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 }} />

iabduul7 avatar Jul 16 '21 05:07 iabduul7

@CaioQuirinoMedeiros Is there any update about this problem?

lucianojsjr avatar Aug 11 '21 23:08 lucianojsjr

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

CaioQuirinoMedeiros avatar Aug 13 '21 23:08 CaioQuirinoMedeiros

try to set precision={0}

ihsanktmr avatar Jan 14 '22 08:01 ihsanktmr