From: Stas Vilchik Date: Tue, 1 Nov 2016 10:25:36 +0000 (+0100) Subject: SONAR-8300 unselect active option on click X-Git-Tag: 6.2-RC1~230 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e16620ded996cfb4dcbd1d853b1a7e67eb8e9ec9;p=sonarqube.git SONAR-8300 unselect active option on click --- diff --git a/server/sonar-web/src/main/js/apps/projects/filters/Filter.js b/server/sonar-web/src/main/js/apps/projects/filters/Filter.js index 72880998bfa..320b1fa9b9c 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/Filter.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/Filter.js @@ -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;