Closed krzysztof-zych closed 3 years ago
@krzysztof-zych Thank you for your contribution. I will review it this weekend.
Thanks a lot for your pull request. Negative values can be complicated. Please see the following screenshot based on your updates.
The first input value is invalid, which was generated by overwriting contents in selection. The second input could be valid, but I hope that negative values would not be turned on automatically. You can refer to "decimal", which needs to be explicitly turned on.
In one line of code, you used this.min < 0
as a part of a conditional clause. I am afraid that condition could be not guaranteed. Or maybe you have other intention by using that piece of code. In that case, could you tell me more?
Please feel free to continue working on this pull request. Thanks again.
Hi @changhuixu Thanks for the review.
The first input is definitely invalid and I believe I fixed it in the last commit. The problem was related to the forecastValue
function so please check it also.
I have changed some other functions and add more conditions to prevent pasting and typing negative sign in places where they should not be valid.
I do not want to use another flag to explicit say that this particular input has support for negative values, because this.min
variable can control it. If we set that variable greater or equal to 0
, then we won't be able to put a negative sign in the control.
Thanks again and looking for your comment.
Hi @changhuixu Have you found some time to review this PR?
Thanks.
Could you pull the latest master branch? I updated an e2e test in order to prevent from breaking some existing applications.
I have published a new version v3.1.0. Please give it a try. Also, please let me know if you want a version for Angular v11 specifically.
Currently, the Travis CI is not working due to the transition their domain names or due to other reasons. Thus the demo site is not up-to-date. I am thinking of finding a new way for CI/CD.
I also changed the default branch name to "main". FYI.
CI/CD is working now. FYI. The demo site is updated.
Also, please let me know if you want a version for Angular v11 specifically.
Hi! I need these changes for Angular v11. Will you be able to make changes also in v2.x?
@patrykdawid Could you try v2.3.0? Thanks.
1. v2.3.0 is not visible everywhere, e.g. it is missing [here](https://github.com/changhuixu/ngx-digit-only/releases) and in the changelog [here](https://github.com/changhuixu/ngx-digit-only#readme). 2. I found it on NPM [here](https://www.npmjs.com/package/@uiowa/digit-only/v/2.3.0), but it also behaves differently, e.g. "@2.3.0" is missing from the installation command. 3. This version installs correctly, but doesn't know _allowNegatives_ :(
Quick autocorrect :) The property is allowNegatives recognized. Point 1 and 2 valid.
Thanks!
This PR will resolve #34 and add support for negative values
User can specify the negative sign with
negativeSign
input value (default-
).