muba-input-text 4.1.4 → 4.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/InputText.js +4 -3
  2. package/package.json +1 -1
package/InputText.js CHANGED
@@ -115,8 +115,8 @@ export default class InputText extends React.Component {
115
115
  }
116
116
 
117
117
  validateType() {
118
- if (this.props.value !== this.props.value?.trim()) {
119
- this.onChangeText(this.props.value.trim())
118
+ if (this.props.value != null && this.props.value !== this.props.value?.toString().trim()) {
119
+ this.onChangeText(this.props.value.toString().trim())
120
120
  }
121
121
  if (this.props.type === 'email') {
122
122
  return this.isValidEmail();
@@ -271,7 +271,8 @@ export default class InputText extends React.Component {
271
271
  selection={this.props.selection}
272
272
  selectionColor={this.props.selectionColor}
273
273
  numberOfLines={this.props.numberOfLines}
274
- maxLength={this.props.maxLength} />
274
+ maxLength={this.props.maxLength}
275
+ {...this.props} />
275
276
  {this.props.children}
276
277
 
277
278
  {this.props.value != null && !this.props.hideCancel ?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-input-text",
3
- "version": "4.1.4",
3
+ "version": "4.1.6",
4
4
  "description": "Input text",
5
5
  "main": "InputText.js",
6
6
  "scripts": {