input-mask
input-mask copied to clipboard
Feat/blur: Enabling updateOn 'blur' functionality
PR Checklist
Please check if your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: CONTRIBUTING.md#commit
- [x] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:
What is the current behavior?
Issue Number: #7
What is the new behavior?
Does this PR introduce a breaking change?
[ ] Yes
[x] No
Other information
This makes the onBlur
behavior work, but I'm not 100% satisfied with the solution. My main issue is the necessity to store the initial value of the formControl in tne onInit
hook in order to determine if the form Control should be dirty or not after bluring. If the value is not checked against the initial value in the onChange hook, just focussing in and out of the form control without manipulating marks it as dirty, which is not correct. Any ideas?
Commit messages do not follow standard guidelines. Please check CONTRIBUTING.md. Or simply run npm run commit
after staging your files.
@Blafasel3 are you working on this PR?