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

Pull request to add dynamic variable to show or hide "-" operator #93

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

snarayankar
Copy link

Added "showNegativeOperator" as a variable which will prepend the "-" sign only if this operator is set to true if not it will return with the prefix & suffix without the operator.

I am using this currency mask in my project, the only limitation is to hide the "-" operator since i am using prefix & suffix which are being used to represent the negative numbers

Added "showNegativeOperator" as a variable which will prepend the "-" sign only if this operator is set to true if not it will return with the prefix & suffix without the operator
Added "showNegativeOperator" as a variable which will prepend the "-" sign only if this operator is set to true if not it will return with the prefix & suffix without the operator
Added "showNegativeOperator" as a variable which will prepend the "-" sign only if this operator is set to true if not it will return with the prefix & suffix without the operator
@nbfontana
Copy link
Owner

nbfontana commented May 26, 2020

Hi @snarayankar, I was doing some testing in your changes and I noticed that after setting allowNegative to true and showNegativeOperator to false it ended up not updating the model to a negative value anymore... I think that your proposal is to keep the negative value but only hide the minus - operator, right?

@snarayankar
Copy link
Author

Hi,
Thank you for the prompt response, my proposal is to keep the negative value but only hide the minus - operator since i am using the prefix & suffix variables to set custom formatting. I hope this answers your question.
-San

@ArtemDintecom
Copy link
Contributor

I think the minus hiding function is too specific for a public project. I will assume that this was necessary to implement the accounting type of negative numbers in parentheses. But in this case, you need to make full support for this mode in the library, for example, by setting negativeMode: 'Natural', 'Accounting'.

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.

3 participants