From 72608a5c560de8ab2926782fba88b49d6fecab60 Mon Sep 17 00:00:00 2001
From: Flavio Tarsetti <Flavio.Tarsetti@idiap.ch>
Date: Mon, 1 Oct 2018 17:15:51 +0200
Subject: [PATCH] [js][plotter] Fix do not show first option for dataformat
 when no selection was done. Closes #154

---
 conda/js/src/components/plotter/PlotterEditor.jsx | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/conda/js/src/components/plotter/PlotterEditor.jsx b/conda/js/src/components/plotter/PlotterEditor.jsx
index b5ba23f7..f551acbc 100644
--- a/conda/js/src/components/plotter/PlotterEditor.jsx
+++ b/conda/js/src/components/plotter/PlotterEditor.jsx
@@ -257,6 +257,12 @@ const mapStateToProps = (state, ownProps) => {
 		plotDfNames: Selectors.dataformatGet(state).map(df => df.name).filter(df => df.startsWith('plot/')),
 		data: plotters[ownProps.index] || getValidObj(),
 	};
+
+	if(obj.data.contents.dataformat === "")
+	{
+		obj.plotDfNames.unshift("-- select an option --")
+	};
+
 	return obj;
 };
 
-- 
GitLab