From 272186a06636a9dccb03c199914aa8c45950f938 Mon Sep 17 00:00:00 2001
From: Nathanael Jourdane <nathanael.jourdane@irap.omp.eu>
Date: Mon, 7 Aug 2017 17:04:39 +0200
Subject: [PATCH] Reset granules grid when the user update the filter

---
 js/app/controllers/EpnTapModule.js | 3 +++
 1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/js/app/controllers/EpnTapModule.js b/js/app/controllers/EpnTapModule.js
index 04c983f..ab5aa36 100644
--- a/js/app/controllers/EpnTapModule.js
+++ b/js/app/controllers/EpnTapModule.js
@@ -166,6 +166,7 @@ Ext.define('amdaDesktop.EpnTapModule', {
 	Among other things, updates the `targetClassCB` combobox and the `servicesGrid` table.
 	*/
 	onProductTypeCBChanged: function() {
+		Ext.getCmp('epnTapGranulesGrid').getStore().removeAll();
 		this.targetClassCB.getStore().removeAll();
 		this.targetNameCB.getStore().removeAll();
 		this.targetNameCB.disable();
@@ -201,6 +202,7 @@ Ext.define('amdaDesktop.EpnTapModule', {
 	Among other things, updates the `targetNameCB` combobox and the `servicesGrid` table.
 	*/
 	onTargetClassCBChanged: function() {
+		Ext.getCmp('epnTapGranulesGrid').getStore().removeAll();
 		this.targetNameCB.getStore().removeAll();
 
 		if (this.targetClassCB.value == 'all') {
@@ -232,6 +234,7 @@ Ext.define('amdaDesktop.EpnTapModule', {
 	Updates the `servicesGrid` table.
 	*/
 	onTargetNameCBChanged: function() {
+		Ext.getCmp('epnTapGranulesGrid').getStore().removeAll();
 		this.updateNbResults();
 	},
 
--
libgit2 0.21.2