Redirect to collection route after creation of an entity
authorDenis Laxalde <denis.laxalde@logilab.fr>
Thu, 06 Apr 2017 12:52:04 +0200
changeset 90 e6ab00d4d3f5
parent 89 b7917282a980
child 91 6cf66f3cedb5
Redirect to collection route after creation of an entity For now we have no way to find the route of the new entity, so let us use this simple mechanism.
src/components/Entity.js
--- a/src/components/Entity.js	Thu Apr 06 12:03:04 2017 +0200
+++ b/src/components/Entity.js	Thu Apr 06 12:52:04 2017 +0200
@@ -373,7 +373,7 @@
                     this.setState({_errors: data.errors});
                     return;
                 }
-                const path = `/${this.etype}/${data.eid}`;
+                const path = `/${this.etype}`;
                 this.context.router.push(path);
             });
     }