Commit 50845e4f authored by jim's avatar jim

fix city unload error

parent f9e23864
...@@ -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