Added numFixed parameter to options (same as for filter) and other bugfixes#35
Added numFixed parameter to options (same as for filter) and other bugfixes#35yerdn wants to merge 2 commits intouhlryk:masterfrom
Conversation
Fixed bug with prepend and append symbols doubling on invalid input. Don't default model to zero on invalid input so user can unset values. Adding fractions part on blur event if numFixed="true".
|
Thank you for your contribution! |
…ple entry of the prepend and append symbols in empty input.
|
Hello, I have added few more fixes: Regards, |
|
Hey |
|
@yerdn can you explain how it should work. Maybe write here in comment how directive with this argument should look like. I ask because it isn't working for me: I created directive :
And when I type for example "1" I expect model equal 1.0000 Maybe you can add working example ( |
|
Hi Krzysztof, numFixed parameter should work the same way as numFixed option for filter. From your documentation "If true then there is fixed number of fraction digets - (useful when fraction part is 00 and we need to show this zeros e.g. 12,00 )". It should be the same behaviour, so it is a combiation of num-fract and num-fixed I suppose. |
|
But both of them has different output. Filter output is string and directive output is javascript number. Therefore in my opinion directive even if works with numFixed in output will change to number ( for example "1.00" will change to "1"). But I can be wrong, does it works for you? If yes please write working example code. |
Added numFixed parameter to options (same as for filter).
Fixed bug with prepend and append symbols doubling on invalid input.
Don't default model to zero on invalid input so user can unset values.
Adding fractions part on blur event if numFixed="true".