uhlryk / angular-dynamic-number

Highly customizable angular directive for numbers
64 stars 32 forks source link

ViewValue changes to 0 when the input field is invalid and try to exceed max digits defined by num-int. #49

Closed FloatingShepherd closed 7 years ago

FloatingShepherd commented 7 years ago

Hi uhlryk,

I have one input field which $invalid === true. I also set max digits to 9 by using num-int. When I tried to type the 10th character, the viewValue of the field changed to 0. I understood that the modelValue was cleared to 0 when the field became invalid. But I think we probably do not want to clear viewValue in this case.

Besides of that the module worked perfectly for me :)

Thanks,

Qing

uhlryk commented 7 years ago

Thank you for your feedback. It shouldn't change to 0. Something is wrong I will check it. It should only happen if you try paste value which has wrong size then it will replace it with 0.

tamvm commented 7 years ago

I found same problem with this issue. Have you had a chance to check and fix it yet?

Thanks

uhlryk commented 7 years ago

hey it should be fixed in latest version. Please check it.