diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx index d9143084c86..c2130d2a157 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.tsx @@ -36,6 +36,7 @@ interface Props { open: boolean; stats: Dict<number> | undefined; statuses: string[]; + forceShow: boolean; } const STATUSES = ['OPEN', 'CONFIRMED', 'REOPENED', 'RESOLVED', 'CLOSED']; @@ -73,7 +74,8 @@ export default class StatusFacet extends React.PureComponent<Props> { } renderItem = (status: string) => { - const active = this.props.statuses.includes(status); + const { statuses } = this.props; + const active = statuses.includes(status); const stat = this.getStat(status); return ( @@ -91,9 +93,13 @@ export default class StatusFacet extends React.PureComponent<Props> { }; render() { - const { fetching, open, statuses, stats = {} } = this.props; + const { statuses, stats = {}, forceShow, fetching, open } = this.props; const values = statuses.map((status) => translate('issue.status', status)); + if (values.length < 1 && !forceShow) { + return null; + } + return ( <FacetBox property={this.property}> <FacetHeader |