From 80ea827c419317059b6038dcaa30bef380a9932a Mon Sep 17 00:00:00 2001 From: Ivar Date: Sun, 11 Dec 2016 15:15:50 +0100 Subject: [PATCH] Parameter type as menu dropdown --- .../src/component/strategies/add-strategy.jsx | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/frontend/src/component/strategies/add-strategy.jsx b/frontend/src/component/strategies/add-strategy.jsx index ccc4400a19..d9ef8047f1 100644 --- a/frontend/src/component/strategies/add-strategy.jsx +++ b/frontend/src/component/strategies/add-strategy.jsx @@ -1,6 +1,6 @@ import React, { PropTypes } from 'react'; -import { Textfield, IconButton } from 'react-mdl'; +import { Textfield, IconButton, Menu, MenuItem } from 'react-mdl'; import { HeaderTitle, FormButtons } from '../common'; @@ -30,14 +30,18 @@ const genParams = (input, num = 0, setValue) => (
{gerArrayWithEntries(num). name={key} onChange={({ target }) => setValue(key, target.value)} value={input[key]} /> - setValue(typeKey, target.value)} - value={input[typeKey]} /> - +
+ + {input[typeKey] || 'string'} + evt.preventDefault()} /> + + + setValue(typeKey, 'string')}>String + setValue(typeKey, 'percentage')}>Percentage + setValue(typeKey, 'list')}>List of values + setValue(typeKey, 'number')}>Number + +
); })});