update it

This commit is contained in:
Sukchan Lee 2017-07-03 22:52:36 +09:00
parent c1c0a40f7e
commit 899234ce25
2 changed files with 12 additions and 0 deletions

View File

@ -171,6 +171,10 @@ class Edit extends Component {
this.state = this.getStateFromProps(props);
}
componentWillMount() {
this.setState(this.getStateFromProps(this.props));
}
componentWillReceiveProps(nextProps) {
this.setState(this.getStateFromProps(nextProps));
}

View File

@ -61,6 +61,14 @@ class Document extends Component {
disableValidation: false
}
componentWillMount() {
const { subscriber, dispatch } = this.props
if (subscriber.needsFetch) {
dispatch(subscriber.fetch)
}
}
componentWillReceiveProps(nextProps) {
const { subscriber, status } = nextProps
const { dispatch, action, onHide } = this.props