From ec22a2be0363f42a3259eb9c83b7651300aba5ec Mon Sep 17 00:00:00 2001 From: Jari Bakken Date: Fri, 24 Oct 2014 10:05:15 +0200 Subject: [PATCH] Sketch out react events --- unleash-server/public/js/unleash.jsx | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/unleash-server/public/js/unleash.jsx b/unleash-server/public/js/unleash.jsx index a4bcb7cf10..c88cd8d44e 100644 --- a/unleash-server/public/js/unleash.jsx +++ b/unleash-server/public/js/unleash.jsx @@ -31,11 +31,16 @@ var FeatureList = React.createClass({ var featureNodes = []; this.props.unsavedFeatures.forEach(function(feature) { - featureNodes.push(); + featureNodes.push(); }); this.props.savedFeatures.forEach(function(feature) { - featureNodes.push(); + featureNodes.push( + + ); }); return (
{featureNodes}
); @@ -66,13 +71,23 @@ var Unleash = React.createClass({ window.alert(error); }, + updateFeature: function (changeRequest) { + console.log(changeRequest); + }, + + createFeature: function (feature) { + console.log(feature); + }, + render: function() { return (
+ savedFeatures={this.state.savedFeatures} + onFeatureChanged={this.updateFeature} + onFeatureSubmit={this.createFeature} />
); }