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.
Files changed (2) hide show
  1. package/InputText.js +9 -0
  2. 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 ?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-input-text",
3
- "version": "4.1.3",
3
+ "version": "4.1.4",
4
4
  "description": "Input text",
5
5
  "main": "InputText.js",
6
6
  "scripts": {