Update collection resource after submission
authorFrank Bessou <frank.bessou@logilab.fr>
Thu, 11 May 2017 10:56:48 +0200
changeset 195 179d532e517a
parent 194 968657b3534c
child 196 b30b72c99142
Update collection resource after submission
src/components/Resource.js
--- a/src/components/Resource.js	Thu May 11 10:50:57 2017 +0200
+++ b/src/components/Resource.js	Thu May 11 10:56:48 2017 +0200
@@ -89,6 +89,7 @@
                     this.setState({errors: data.errors});
                     return;
                 }
+                this.props.updateResource();
                 this.context.router.history.push(path);
             });
     }
@@ -106,6 +107,7 @@
 }
 ResourceCreationForm.propTypes = {
     resource: PropTypesResourceModel.isRequired,
+    updateResource: PropTypes.func,
 };
 ResourceCreationForm.contextTypes = {
     router: PropTypes.object,