muba-input-text 4.1.3 → 4.1.4
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 +9 -0
- package/package.json +1 -1
package/InputText.js
CHANGED
@@ -115,6 +115,9 @@ 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())
|
120
|
+
}
|
118
121
|
if (this.props.type === 'email') {
|
119
122
|
return this.isValidEmail();
|
120
123
|
} else if (this.props.type === 'number') {
|
@@ -212,6 +215,12 @@ export default class InputText extends React.Component {
|
|
212
215
|
this.input.focus();
|
213
216
|
}
|
214
217
|
|
218
|
+
checkText = () => {
|
219
|
+
if (this.props.value !== this.props.value?.trim()) {
|
220
|
+
this.onChangeText(this.props.value.trim())
|
221
|
+
}
|
222
|
+
}
|
223
|
+
|
215
224
|
render() {
|
216
225
|
return (
|
217
226
|
this.state.fontLoaded ?
|