From 8e6d994704e95b8ac58b105337142baa3ccdf483 Mon Sep 17 00:00:00 2001 From: Flavio Tarsetti <Flavio.Tarsetti@idiap.ch> Date: Thu, 18 Oct 2018 17:03:32 +0200 Subject: [PATCH] [plotterparameter] do not show first option for plotter when no selection was done --- .../components/plotterparameter/PlotterParameterEditor.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/conda/js/src/components/plotterparameter/PlotterParameterEditor.jsx b/conda/js/src/components/plotterparameter/PlotterParameterEditor.jsx index e93500cd..9c90b2ff 100644 --- a/conda/js/src/components/plotterparameter/PlotterParameterEditor.jsx +++ b/conda/js/src/components/plotterparameter/PlotterParameterEditor.jsx @@ -172,6 +172,13 @@ const mapStateToProps = (state, ownProps) => { plotters: Selectors.plotterGet(state), data: params[ownProps.index] || getValidObj(), }; + + if(!obj.data.contents.hasOwnProperty('plotter') || + obj.data.contents.plotters === "") + { + obj.plotters.unshift({name: "-- select an option --"}) + }; + return obj; }; -- GitLab