From 9d5b9172fa40a8759aad0e8a0bd4c5bf7ba30203 Mon Sep 17 00:00:00 2001 From: David Kaltschmidt Date: Fri, 13 Nov 2015 15:04:16 +0100 Subject: [PATCH] Fix react key warning --- client/app/scripts/components/topology-options.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/app/scripts/components/topology-options.js b/client/app/scripts/components/topology-options.js index a749317a5..301324a37 100644 --- a/client/app/scripts/components/topology-options.js +++ b/client/app/scripts/components/topology-options.js @@ -7,10 +7,15 @@ const TopologyOptions = React.createClass({ renderAction: function(action, option, topologyId) { return ( - + ); }, + /** + * transforms a list of options into one sidebar-item. + * The sidebar text comes from the active option. the actions come from the + * remaining items. + */ renderOption: function(items) { let activeText; let activeValue; @@ -41,7 +46,7 @@ const TopologyOptions = React.createClass({ }, this); return ( -
+
{activeText} {actions}