-
Notifications
You must be signed in to change notification settings - Fork 417
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
onInvalidPaste not working, all other options are working #702
Comments
So, my problem seems to be from this. autoNumeric/src/AutoNumeric.js Line 2141 in 4942988
It seems that the pasted value doesn't go through Shouldn't it go through the This is a weird behavior to have it validated by the min/max first before going through the onInvalidPaste. Although, when pasting any value, it really doesn't do any of the options: It feels hack-ish to manipulate the pasted value before going through autonumeric if the package is supposed to do it.
Different concern. Our Sentry.io is blowing up because of the min/max errors from autonumeric. It is probably good to have like a We want to keep track of errors from our js, and never mind the value pasted to autonumeric because it's above the |
It's indeed not the intended behavior, as the On a side note, there is a I'm currently swamped at work, and cannot check that out just yet, so it will be fixed whenever possible, sorry ;) |
You can try to use useLayoutEffect instead useEffect, it fixed the problem in my case |
I have the same issue in the |
Any Updates on this? Is the issue resolved. |
Current behavior
Setting the
onInvalidPaste
to anything doesn't work at all. It's supposed to be set totruncate
orignore
, but it's just screaming out errors. (It's literally cluttering our error reporting tools)Expected behavior
onInvalidPaste
should work as intended, depending on what is set.Steps to reproduce the problem
v4.6.0
Chrome
version85.0.4183.121
MacOS Mojave 10.14.6
operating systemI was first using the react-numeric package as it is a good react wrapper component to autonumeric. But, the
onInvalidPaste
didn't seem to work. So, I tried using autonumeric myself thinking it might just be react-numeric. (although, i checked out that package's code first and everything seems fine)So, I tried it out like this:
Link to live example (https://codepen.io/marcdagatan/pen/mdEPVbW)
I didn't even use react here. just your plain ol' vanilla js. And the problem is there.
onInvalidPaste
just doesn't work at all.On a side note, I truly love this package. I've contributed a few lines here. But, it just throws error messages left and right. Getting crazy with error reporting apps. I am going to continue using this package on personal projects.
The text was updated successfully, but these errors were encountered: