Releases: s-yadav/react-number-format
Releases · s-yadav/react-number-format
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.
Fixes
- Fixes #736 - Fix for focus on mount getting reset.
- Fixed #740 - fixed type for the format, removeFormat, getCaretBoundary.
- Fixed #741 - Thousand and decimal formatting broken while typing when value isNumericString is set to false
- Fixed #742 - cursor position getting changed when format props are updated during typing.
- Fixed #725 - The cursor position not being correct when allowed decimal separator is typed
- Fixed a couple of false positive tests and some regressions around those.
Bug fixes
Bug fixes
- Fixed #712 (Extra character added if you start typing from start of the input while input is fully filled)
- Fixed #711 (The caret is not moved when typing a decimal separator at an existing decimal separator)
- Mark module as side effect free (#713 by @topaxi )
- pass type parameter to SyntheticEvent in event source object. (#703 by @yukiyokotani )
Bug fixes
Bug fixes
Bug fixes
Major Release (v5) - React Number Format rewrite
RNF v5 is complete rewrite with the aim of extensibility and smaller bundle size. Here are following changes on v5. Most of them are breaking change, but would take minimal effort from migrating from v4 to v5. See migration doc
Changes
- React number format is broken into smaller Modules, NumericFormat and Pattern Format, so only things you need are exposed.
- RNF provides lower level hooks and component (useNumericFormat, usePatternFormat) to allow full customisation. Check customisation doc.
- customNumerals prop is removed in favour of outside customization, example
- isNumericString prop is renamed to valueIsNumericString.
Added support for React 18
v4.9.2 - Added support for react 18.
Enhancement and bug fixes.
- Fix regular expression for custom numerals. PR: #594 By @aSosunoff
- Fixed backspace issue when caret is before - sign (#597)
- React peer dependency fix - PR: #565 By @navarroaxel
- make typings for customInput generic - PR #577 By @patsimm