jim 8 лет назад
Родитель
Сommit
50845e4f99
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      src/routes/Userinfo/GeographicView.js

+ 8 - 0
src/routes/Userinfo/GeographicView.js

@@ -24,6 +24,14 @@ export default class GeographicView extends PureComponent {
       type: 'geographic/fetchProvince',
     });
   };
+  componentDidUpdate(props) {
+    if (!props.value && !!this.props.value && !!this.props.value.province) {
+      this.props.dispatch({
+        type: 'geographic/fetchCity',
+        payload: this.props.value.province.key,
+      });
+    }
+  }
   getProvinceOption() {
     return this.getOption(this.props.province);
   }