cchanxzy / react-currency-input-field

React component for an input field
MIT License
648 stars 118 forks source link

fix: clean negative decimal seperator (#336) #337

Closed msodiq19 closed 1 month ago

msodiq19 commented 8 months ago

Entering "-." gets immediately changed into "." have been fixed and now changes to "-0."

msodiq19 commented 8 months ago

@cchanxzy

codecov-commenter commented 8 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.75%. Comparing base (2fb18c0) to head (7673036). Report is 11 commits behind head on main.

:exclamation: Current head 7673036 differs from pull request most recent head 66bffa6

Please upload reports for the commit 66bffa6 to get more accurate results.

Files Patch % Lines
src/components/utils/cleanValue.ts 50.00% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #337 +/- ## =========================================== - Coverage 100.00% 99.75% -0.25% =========================================== Files 15 15 Lines 411 413 +2 Branches 159 155 -4 =========================================== + Hits 411 412 +1 - Misses 0 1 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

cchanxzy commented 8 months ago

Hello @msodiq19, would you be able to add some unit tests with this PR? In order to prevent someone else changing the behaviour in the future. Thanks!

msodiq19 commented 8 months ago

Hello @cchanxzy, I have added unit test to the PR