fix frozen validation input field

This commit is contained in:
or-else
2022-08-27 12:51:52 -07:00
parent 5006a6fb34
commit 22320808fc
5 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -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
};
}