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.
- package/InputText.js +4 -3
- 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 ?
|