Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to type trailing zeroes after the decimal separator #4

Merged
merged 4 commits into from
Dec 8, 2018
Merged

Allow to type trailing zeroes after the decimal separator #4

merged 4 commits into from
Dec 8, 2018

Conversation

bellini666
Copy link
Contributor

This is to solve an issue where you could not type a 0 after the decimal separator. For example:

If I had 1, in the text, after typing 0 it would become 1

If I had 1.1 in the text, typing 0 would do nothing

That means that I was not able to enter numbers like 1.01 or 1.0101 for example.

This PR should solve all those issues

@bellini666
Copy link
Contributor Author

I just added one more commit to solve an issue on samsung galaxy notes. You can see the issue here using the expo example in this repository:

img_20181205_185727006

The change totally solved the issue in that device and also continued working on others without breaking anything

@budiadiono
Copy link
Owner

Awesome! Thank you so much for this fix! But I think there is one small issue here that I we had 1, after pressing 000 button it still become 1 instead of 1.000, can you fix this before I merge it?

@bellini666
Copy link
Contributor Author

@budiadiono of course I can, but for curiosity, how exactly did you reproduce the issue? I'm having a hard time with it. Can you give a more detailed explanation please?

@budiadiono
Copy link
Owner

@bellini666 sure, you just need to run build and then go to the \example folder and run the example project from there. I did a little trick with babel config by creating alias for react-native-calculator. Here's the trick: https://github.com/budiadiono/react-native-calculator/blob/master/example/.babelrc#L6 :)

@bellini666
Copy link
Contributor Author

@budiadiono I was already running the example fine. I actually made this contribution testing the example. The screenshot I sent is also from it (notice the footer buttons) :)

I asked how to reproduce the small issue you commented here. It seems that you are saying that when pressing 0001 it should become something other than 1, but AFAIK that shouldn't happen, right? I probably didn't fully understand your comment

@budiadiono
Copy link
Owner

Oh sorry, I should have more coffee😁. What I mean is by pressing the triple dot button (000) after 1.

rncalc

That it should be 1.000 :)

@bellini666
Copy link
Contributor Author

Ohhh ok, I see the issue now hahaha. I think I didn't try to press the 000 on my tests lol

I'll take a look at that today or tomorrow and will update the PR :)

@bellini666
Copy link
Contributor Author

@budiadiono it is done! If there're no more issues, it is ready to be merged!

Oh, when you merge it and release a new version, can you ping me? I want to go back to your dep instead of using my fork in my package.json =P

@budiadiono budiadiono merged commit fbe3786 into budiadiono:master Dec 8, 2018
@budiadiono
Copy link
Owner

OK Cool! Thank you so much @bellini666. I'll let you know soon when it get released.

@budiadiono
Copy link
Owner

Hi @bellini666 it's released now! https://github.com/budiadiono/react-native-calculator/releases/tag/v0.5.0.

@bellini666
Copy link
Contributor Author

@budiadiono awesome, thanks for the heads up :)

@bellini666 bellini666 deleted the trailing_zero branch December 9, 2018 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants