-
Notifications
You must be signed in to change notification settings - Fork 15
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
Update cleave.js
to cleave-zen
#2026
Conversation
455908f
to
c840521
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/JoinColony/colonyCDapp/actions/runs/8192265293/job/22403383516?pr=2026#step:4:120
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good code wise and functionality wise!
I was wondering whether we can do something about the cursor jumping when changing digits in the middle of the number. I know this was a problem before, I just thought it might be fixed by updating this library...
c840521
to
aa11b71
Compare
@rdig It might be what Chris mentions but I've rebased it just in case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good now. You guys were right, might have been a npm issue after all
So this took longer than anticipated.
The author deprecated cleave.js: nosir/cleave.js#723 and a new library has been created in its place: https://github.com/nosir/cleave-zen
The approach to how the library works changed almost completely, so I had to make some extra modifications to the forms (also to simplify the code as it was hard to understand what the heck was happening). I think the new library is easier to use and integrate.
Hopefully, everything still works as expected but now without the annoying warning of
componentWillReceiveProps
. The forms most affected by the changes are mint tokens, transfer funds, and simple payments.Resolves #2001