prevProps.basicInfo == undefined

dev_forum
hjm 5 years ago
parent f4c48d4269
commit f7b666db83

@ -28,8 +28,8 @@ class AccountBasic extends Component {
} }
} }
componentDidUpdate =(prevState)=>{ componentDidUpdate =(prevProps)=>{
if(this.props.basicInfo && this.props.basicInfo != prevState.basicInfo){ if(this.props.basicInfo && prevProps.basicInfo == undefined){
this.setValue(this.props.basicInfo); this.setValue(this.props.basicInfo);
this.getSchoolList(this.props.basicInfo); this.getSchoolList(this.props.basicInfo);
} }

Loading…
Cancel
Save