diff --git a/src/components/GenericField.js b/src/components/GenericField.js index 5a7f81c..ffa8140 100644 --- a/src/components/GenericField.js +++ b/src/components/GenericField.js @@ -15,14 +15,11 @@ export default class GenericField extends Component { } handleInput(newText) { - // const regexTest = /\w+/g; - console.warn('handleInput', newText); - this.setState({ text: newText.trim(), }, // Callback from setState - () => { this.verificaTexto(newText, this.props.validorRegex); }, + () => { this.verificaTexto(this.state.text, this.props.validorRegex); }, ); }