Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
react-number-format
from v4 to v5;@typescript-eslint
to v8, the@typescript-eslint/ban-types
no longer exists;ramda
;Before:
After
In order not to have to change all the imports path, a prop
hasFormat
was added to verifiy if the fields needs a format mask(like: '#####-##')
, or if the field is a number or money field, witch needs other props.The
NumericFormat
component, whenthousandSeparator='.'
and/ordecimalScale={0}
has these configs, theonchange
funcion does no work propperly. Insted, theonValueChange
has to be used. It has two params, thevalues
object, wich returns{ formattedValue, value, floatValue }
and thesourceInfo
param, wich return the synthetic event. In cases you need to avoid the onChange triggers when the component is mounted, just set!sourceInfo.event
.