Currency input not handling negative numbers

I'm using currency inputs to input a value of an item, sometimes this needs to be negative, but i'm noticing the currency input doesn't properly display it's value. If i type in a negative sign in front of the currency value , the negative sign will dissapear as soon as i unfocus the input, but the value in its state will remain negative.

Is this a bug or intended feature?

Hello @annadox,

I tested your requirement and it works as expected. The currency input accepts negative numbers with a minus sign, and after unfocusing the component, the negative value is still displayed correctly.

Here are the reference screenshots:

With focus on input:

Without focus on input:

2 Likes

Hey @annadox! I wasn’t able to reproduce the bug either. Could you share a screenshot or a Loom video so I can get a better idea of what’s happening?

2 Likes

Hey @annadox, checking in to see how you are doing and if you still have trouble with currency input?

Yes I'm still having trouble. The thing is that it is very inconsistent, sometimes it doesn't display the - and sometimes it does.

image
image

The currency field is part of a form that gets an object as a data source. The property that corresponds to the field also has the same value that is displayed in the value property of the state (screenshot).

Hey @annadox, thanks for letting me know! I still have not been able to reproduce this bug. Are you able to share a Loom video showing the issue and your data source? It would also help if you could describe the exact steps you take from start to finish! Thank you! :pray:t3:

Hello again @annadox, are you still seeing this issue? If so, can you share which data source you are using? If convenient, a quick Loom video showing the steps to reproduce would be super helpful. That will help me understand what is happening and debug faster. Thanks!