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

How to disable the auto-deletion of trailing zeros in floating-point numbers? #1076

Open
ipomazkin-fin opened this issue Sep 18, 2024 · 0 comments

Comments

@ipomazkin-fin
Copy link

ipomazkin-fin commented Sep 18, 2024

To Reproduce
Having mask like this:

{
    mask: 'num',
    lazy: false,
    blocks: {
      num: {
        expose: true,
        mask: Number,
        radix: '.',
        thousandsSeparator: ',',
        scale: 4
      },
    },
  }

When user enter the value "1.2003" first and then tries to delete the last number (3) the lib automatically removes zeros.
Expected: "1.2003" -> "1.200"
Received: "1.2003" -> "1.2"

Environment:

  • OS: macOS
  • Browser: chrome
  • Version: any
  • IMask version: "imask": "^7.6.1"
  • Framework/plugin version if used: "react-imask": "^7.6.1"

Additional context
Are there a way to disable this feature?

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

No branches or pull requests

1 participant