From 0f9b13db8ba5c686fe161c5ce0b68b612f457dc1 Mon Sep 17 00:00:00 2001 From: Mauro Bartolomeoli Date: Wed, 11 Jan 2017 15:23:09 +0100 Subject: [PATCH] Removed highlights when featuregrid disappears --- web/client/components/data/featuregrid/DockedFeatureGrid.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/client/components/data/featuregrid/DockedFeatureGrid.jsx b/web/client/components/data/featuregrid/DockedFeatureGrid.jsx index 2b96085be7..badca7cd9c 100644 --- a/web/client/components/data/featuregrid/DockedFeatureGrid.jsx +++ b/web/client/components/data/featuregrid/DockedFeatureGrid.jsx @@ -131,6 +131,10 @@ const DockedFeatureGrid = React.createClass({ this.featureLoaded.successCallback(rowsThisPage, nextProps.totalFeatures); } } + if ((this.props.columnsDef && !nextProps.columnsDef) || (this.props.filterObj && !nextProps.filterObj)) { + this.props.selectFeatures([]); + this.props.selectAllToggle(); + } }, componentDidUpdate(prevProps) { if (!this.props.loadingGrid && !this.featureLoaded && !this.props.pagination && this.props.searchUrl) {