From 927e252885d7e6a73ef5ba24f392cb1329dc0caf Mon Sep 17 00:00:00 2001 From: Alex P Date: Mon, 19 Jun 2017 16:17:05 -0700 Subject: [PATCH] Consolidate map methods Moved the ternary operator into the onClick --- ui/src/shared/components/FunctionSelector.js | 43 ++++++++------------ 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/ui/src/shared/components/FunctionSelector.js b/ui/src/shared/components/FunctionSelector.js index de7e813a2b..7f0d9b4bec 100644 --- a/ui/src/shared/components/FunctionSelector.js +++ b/ui/src/shared/components/FunctionSelector.js @@ -74,33 +74,22 @@ class FunctionSelector extends Component { }
- {singleSelect - ? INFLUXQL_FUNCTIONS.map((f, i) => { - return ( -
- {f} -
- ) - }) - : INFLUXQL_FUNCTIONS.map((f, i) => { - return ( -
- {f} -
- ) - })} + {INFLUXQL_FUNCTIONS.map((f, i) => { + return ( +
+ {f} +
+ ) + })}
)