Skip to content

Commit

Permalink
Merge pull request #174 from benhurott/dev-1.12.4
Browse files Browse the repository at this point in the history
dev-1.12.4 to master
  • Loading branch information
Ben-hur Santos Ott authored Jul 21, 2019
2 parents 0b04ce4 + aa45529 commit a9e1ef1
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## Unreleased

## [1.12.4] - 2019-07-12

### Fix

- [#170](https://github.com/benhurott/react-native-masked-text/issues/170): fixing typing for includeRawValueInChangeText.
- thanks to [Sergei Butko](https://github.com/svbutko) for contribution.
- thanks to [Agustin G.](https://github.com/agustingabiola) for reporting.
- [#173](https://github.com/benhurott/react-native-masked-text/issues/173): fixing initial value for money field.
- thanks to [Maksim Markelov](https://github.com/mmarkelov) for reporting.

## [1.12.3] - 2019-05-17

### Fix
Expand Down
2 changes: 1 addition & 1 deletion dist/lib/base-text-component.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ export interface TextInputMaskOptionProp {
validator?: (value: string, settings: TextInputMaskOptionProp) => boolean
getRawValue?: (value: string, settings: TextInputMaskOptionProp) => any
translation?: { [s: string]: (val: string) => string | null | undefined }

// Options
includeRawValueInChangeText?: boolean
}

// TextInputMask Props
Expand All @@ -62,6 +59,7 @@ export interface TextInputMaskProps extends Pick<TextInputProps, Exclude<keyof T
refInput?: (ref: any) => void
customTextInput?: any
customTextInputProps?: Object
includeRawValueInChangeText?: boolean
}

// TextInputMask Component
Expand Down
7 changes: 6 additions & 1 deletion lib/base-text-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,13 @@ export default class BaseTextComponent extends PureComponent {
}

_getMaskedValue(value) {
const defaultValue = this._getDefaultValue(value)
if (defaultValue === '') {
return ''
}

return this._maskHandler.getValue(
this._getDefaultValue(value),
defaultValue,
this._getOptions());
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-masked-text",
"version": "1.12.3",
"version": "1.12.4",
"description": "Text and TextInput with mask for React Native applications",
"licenses": [
{
Expand Down

0 comments on commit a9e1ef1

Please sign in to comment.