Enable dynamic segment edits
[PREMIUM-44]
This commit is contained in:
@@ -57,8 +57,6 @@ define(
|
|||||||
if (props.item === undefined) {
|
if (props.item === undefined) {
|
||||||
this.refs.form.reset();
|
this.refs.form.reset();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
this.loadItem(props.params.id);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadItem: function (id) {
|
loadItem: function (id) {
|
||||||
@@ -76,6 +74,9 @@ define(
|
|||||||
loading: false,
|
loading: false,
|
||||||
item: response.data,
|
item: response.data,
|
||||||
});
|
});
|
||||||
|
if (typeof this.props.onItemLoad === 'function') {
|
||||||
|
this.props.onItemLoad(response.data);
|
||||||
|
}
|
||||||
}).fail(() => {
|
}).fail(() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
loading: false,
|
loading: false,
|
||||||
|
Reference in New Issue
Block a user