cesarrew / ng2-currency-mask

A very simple currency mask directive that allows using a number attribute with the ngModel.
MIT License
235 stars 116 forks source link

Add ability to work from left to right and add decimal values only if… #82

Closed thomaswdean closed 6 years ago

thomaswdean commented 6 years ago

According to some of the issues I read users need the ability to work left to right and/or to ignore the decimal places during entry. I believe that these changes provide not just that but also the ability to have the value selected on focus.

hassanasad commented 6 years ago

Can the admin/moderators please review this PR - Its a cool feature to have

cesarrew commented 6 years ago

@thomaswdean Hi. Thank you for this PR. I've merged it in my code and the mask didn't work, duplicating de prefix as example. I've tested it keeping the default values. It will be very helpful if you review and test this code.

thomaswdean commented 6 years ago

I've made some changes and checked them in. I will create a new PR. If there are any issues you see can you please give me more specifics because what I had checked in before has been being used in a beta app since I created the PR. The changes I made are for issues found by QA.

thomaswdean commented 6 years ago

Ok. I realized what you were saying was what I had changed made the component only support the Left To Right entry so in my new PR I fixed that as well as making the direction a configurable option.

thomaswdean commented 6 years ago

Cesar,

I was just wondering if you have seen my new PR. I think that it has a lot of value. I thoroughly tested it with the direction set to left to right and right to left. I could make that config option an enum if you feel that would be better as it is more restrictive.

Thomas

On Fri, Mar 9, 2018 at 9:24 AM, César Mendonça notifications@github.com wrote:

@thomaswdean https://github.com/thomaswdean Hi. Thank you for this PR. I've merged it in my code and the mask didn't work, duplicating de prefix as example. I've tested it keeping the default values. It will be very helpful if you review and test this code.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cesarrew/ng2-currency-mask/pull/82#issuecomment-371843664, or mute the thread https://github.com/notifications/unsubscribe-auth/ADUmutdESrzk0FiSDkD1MhPLytX3oYP_ks5tcp6cgaJpZM4RWYrs .

pcbl commented 5 years ago

Hey folks. Is this this feature going to be integrated to the component? I have a scenario where it will help a lot! Thanks again for the valuable work and keep up the great job!