From 0e01c892600ea6d11d705599d0d312a0cf9fffa1 Mon Sep 17 00:00:00 2001 From: Jari Bakken Date: Wed, 3 Dec 2014 13:35:47 +0100 Subject: [PATCH] Refresh feature list immediately on create. --- public/js/components/feature/FeatureTogglesComponent.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/js/components/feature/FeatureTogglesComponent.jsx b/public/js/components/feature/FeatureTogglesComponent.jsx index 47a2af6231..4f2d86e612 100644 --- a/public/js/components/feature/FeatureTogglesComponent.jsx +++ b/public/js/components/feature/FeatureTogglesComponent.jsx @@ -48,6 +48,7 @@ var FeatureTogglesComponent = React.createClass({ updateFeature: function (feature) { this.stopFeaturePoller(); + this.state.featureStore .updateFeature(feature) .then(this.startFeaturePoller) @@ -65,8 +66,12 @@ var FeatureTogglesComponent = React.createClass({ }, createFeature: function (feature) { - this.state.featureStore.createFeature(feature) + this.stopFeaturePoller(); + + this.state.featureStore + .createFeature(feature) .then(this.cancelNewFeature) + .then(this.startFeaturePoller) .catch(this.handleError); },