From d761867a7d85b588d7218e8c4647d660f72d1df3 Mon Sep 17 00:00:00 2001 From: Pavel Dohnal Date: Tue, 28 Nov 2017 13:12:18 +0000 Subject: [PATCH] Enable dynamic segment edits [PREMIUM-44] --- assets/js/src/form/form.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/js/src/form/form.jsx b/assets/js/src/form/form.jsx index b447d1f780..eef0443c93 100644 --- a/assets/js/src/form/form.jsx +++ b/assets/js/src/form/form.jsx @@ -57,8 +57,6 @@ define( if (props.item === undefined) { this.refs.form.reset(); } - } else { - this.loadItem(props.params.id); } }, loadItem: function (id) { @@ -76,6 +74,9 @@ define( loading: false, item: response.data, }); + if (typeof this.props.onItemLoad === 'function') { + this.props.onItemLoad(response.data); + } }).fail(() => { this.setState({ loading: false,