fix frozen validation input field
This commit is contained in:
@@ -21,7 +21,7 @@ class ValidationView extends React.PureComponent {
|
||||
|
||||
this.state = {
|
||||
code: props.credCode || '',
|
||||
codeReceived: false
|
||||
codeReceived: props.credCode
|
||||
};
|
||||
|
||||
this.handleChange = this.handleChange.bind(this);
|
||||
@@ -31,10 +31,10 @@ class ValidationView extends React.PureComponent {
|
||||
}
|
||||
|
||||
static getDerivedStateFromProps(nextProps, prevState) {
|
||||
if (nextProps.credCode != prevState.code) {
|
||||
if (nextProps.credCode != prevState.codeReceived) {
|
||||
return {
|
||||
code: nextProps.credCode || '',
|
||||
codeReceived: !!nextProps.credCode
|
||||
codeReceived: nextProps.credCode
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -9804,7 +9804,7 @@ class ValidationView extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureC
|
||||
super(props);
|
||||
this.state = {
|
||||
code: props.credCode || '',
|
||||
codeReceived: false
|
||||
codeReceived: props.credCode
|
||||
};
|
||||
this.handleChange = this.handleChange.bind(this);
|
||||
this.handleKeyPress = this.handleKeyPress.bind(this);
|
||||
@@ -9813,10 +9813,10 @@ class ValidationView extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureC
|
||||
}
|
||||
|
||||
static getDerivedStateFromProps(nextProps, prevState) {
|
||||
if (nextProps.credCode != prevState.code) {
|
||||
if (nextProps.credCode != prevState.codeReceived) {
|
||||
return {
|
||||
code: nextProps.credCode || '',
|
||||
codeReceived: !!nextProps.credCode
|
||||
codeReceived: nextProps.credCode
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user