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

one-way-number-mask slow #81

Open
maxymczech opened this issue Jul 18, 2018 · 2 comments
Open

one-way-number-mask slow #81

maxymczech opened this issue Jul 18, 2018 · 2 comments

Comments

@maxymczech
Copy link

{{one-way-number-mask
  value=val
  update=(action (mut val))
  class="someclass"
  options=(hash groupSeparator=" ")
}}

This code generates ton of [violation] errors in JS console:

[Violation] 'setTimeout' handler took 144ms
[Violation] 'input' handler took 693ms

And works slow. What could be the problem here?

@brandynbennett
Copy link
Collaborator

Best I can tell this has to do with the underlying Inputmask.js library. There's another issue about the performance problems with it. It would definitely be in the best interest of this addon to find/make a less bulky, more performant underlying solution.

@maxymczech
Copy link
Author

Hi there, thanks for responding. I have tried another plugin for this:

https://github.com/text-mask/text-mask/tree/master/ember
https://github.com/text-mask/ember-text-mask-addons

It works way faster than ember-inputmask, however it is worse at handling two-way bindings, and the value gets mutated to include mask, so you have to do additional work to remove mask and validate...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants