]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8300 unselect active option on click
authorStas Vilchik <vilchiks@gmail.com>
Tue, 1 Nov 2016 10:25:36 +0000 (11:25 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 2 Nov 2016 08:03:26 +0000 (09:03 +0100)
server/sonar-web/src/main/js/apps/projects/filters/Filter.js

index 72880998bfa54d14e8f0ea1135a764208a5293be..320b1fa9b9c517603cd339a13ccc04f15e519eb4 100644 (file)
@@ -86,7 +86,10 @@ export default class Filter extends React.Component {
       active: option === value,
       'search-navigator-facet-half': this.props.halfWidth
     });
-    const path = this.props.getFilterUrl({ [property]: option });
+
+    const path = option === value ?
+        this.props.getFilterUrl({ [property]: null }) :
+        this.props.getFilterUrl({ [property]: option });
 
     const facetValue = (facet && getFacetValueForOption) ? getFacetValueForOption(facet, option) : null;