X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fframework%2Fwidgets%2Fform_controls%2FselectOption.jsx;h=1e02f15dadefd96f00feafae01d8cd1e9b3b06d9;hb=3d39b18290b9cb3e10c1a80d91ac4819e7c58474;hp=41a8b13532ed472f78fb34c7f298dc9e500b669a;hpb=e29efc315df33d546237e270470916e26df391d6;p=osm%2FUI.git
diff --git a/skyquake/framework/widgets/form_controls/selectOption.jsx b/skyquake/framework/widgets/form_controls/selectOption.jsx
index 41a8b1353..1e02f15da 100644
--- a/skyquake/framework/widgets/form_controls/selectOption.jsx
+++ b/skyquake/framework/widgets/form_controls/selectOption.jsx
@@ -1,5 +1,5 @@
/*
- *
+ *
* Copyright 2016 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -29,31 +29,64 @@ export default class SelectOption extends React.Component {
let html;
let defaultValue = this.props.defaultValue;
let options = this.props.options.map(function(op, i) {
- let value = JSON.stringify(op.value);
- return
+ let value;
+ let label;
+ if(typeof(op) == 'object') {
+ value = JSON.stringify(op.value);
+ label = op.label;
+ } else {
+ value = op;
+ label = op;
+ }
+
+ return
});
if (this.props.initial) {
options.unshift();
}
html = (
-