Commit 7c1d6a99 authored by jim's avatar jim

fix city unload error

parent 52b64ba3
...@@ -24,6 +24,14 @@ export default class GeographicView extends PureComponent { ...@@ -24,6 +24,14 @@ export default class GeographicView extends PureComponent {
type: 'geographic/fetchProvince', 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() { getProvinceOption() {
return this.getOption(this.props.province); return this.getOption(this.props.province);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment