handle caret position when float numbers are used with decimals #851
Remove isCharacterSame as valid prop from NumericFormat and PatternFormat as its a number_format base props and shouldn't be used outside. #850
Remove prop-types as dependency as they are no longer used. #849
Bug fixes and Test + Build upgrade
Test and Build improvements
Migrated test suite to vite, JSdom and react testing library, from Jasmine and Karma. Plus, a lot of fixes around the false negative test. Shout out to @aashu16
Unnecessary files are no longer included on npm package. Fixes #840
Added a better way to find change range which fixes issues around duplicate subsequent characters giving incorrect change range causing inconsistent caret positioning.
API Improvements
onValueChange now fires always if there is any change on the input, weather update comes from props or user events. This makes the callback more predictable. Fixed #812, Thanks to @rfviolato
Other Bug Fixes
Fix issue when complete text is selected and replaced with new value in pattern format. It was it was incorrectly pasting value.
Fix key press after selection over masked area. #839
Bug fix
Fix caret position not getting corrected when there is selection in the input. #780
Bug fixes
Fix caret position getting reset on jest + testing library. #814 by @csantos1113
Fix for prop values on not updating (not reflecting on input) on StrictMode. Regression of v5.2.0
fix(number_format_base): prevent warnings in SRR when using useLayoutEffect. by @NicolasMontone
Regression fix from 5.2.0
Regression fix: try to correct the value if the old formatted value is provided but the format prop changes
Bug fixes and valueIsNumericString prop improvement.
Improvements
Optimize rendering, and avoid multiple rerender when number format is mounted.
Try to guess valueIsNumericString based on props and value, so the user no longer has to define this prop, if the format prop (prefix/ suffix for numeric format, format prop for pattern format) doesn't have the number in it.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps react-number-format from 4.9.4 to 5.4.1.
Release notes
Sourced from react-number-format's releases.
... (truncated)
Commits
a1fab6d
Version upgrade for bug fixes901816b
- Remove prop-types as dependency as they are no longer used. #8498a9e2d6
- Remove isCharacterSame as valid prop from NumericFormat and PatternFormat a...5db9496
- handle caret position when float numbers are used with decimals #8517a373b9
Instead of blacklist use whitelist for including in npm.dbcd429
- Fix key press after selection over masked area.38ce3ba
Merge pull request #842 from rfviolato/masterc866092
fix:onValueChange
not called for values with 3 or less characters5edf305
Merge pull request #779 from s-yadav/devca97625
Remove .only from test.Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show