fix for #19
This commit is contained in:
+1
-5
@@ -2717,7 +2717,7 @@ class ValidationView extends React.PureComponent {
|
|||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
code: props.credCode
|
code: props.credCode || ''
|
||||||
};
|
};
|
||||||
|
|
||||||
this.handleChange = this.handleChange.bind(this);
|
this.handleChange = this.handleChange.bind(this);
|
||||||
@@ -2725,10 +2725,6 @@ class ValidationView extends React.PureComponent {
|
|||||||
this.handleSubmit = this.handleSubmit.bind(this);
|
this.handleSubmit = this.handleSubmit.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
static getDerivedStateFromProps(nextProps, prevState) {
|
|
||||||
return {code: nextProps.credCode};
|
|
||||||
}
|
|
||||||
|
|
||||||
handleChange(e) {
|
handleChange(e) {
|
||||||
this.setState({code: e.target.value});
|
this.setState({code: e.target.value});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user