aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmbroise C <ambroise.christea@sonarsource.com>2024-01-18 16:09:54 +0100
committersonartech <sonartech@sonarsource.com>2024-01-18 20:03:23 +0000
commitf9deebc4558057ca6f1a521152e56527a9a0112c (patch)
tree0d03f4c8055e95cced09c1c62b941f0c40f47f91
parent52c4872aa2259ac25b65067ba158e49560f0687d (diff)
downloadsonarqube-f9deebc4558057ca6f1a521152e56527a9a0112c.tar.gz
sonarqube-f9deebc4558057ca6f1a521152e56527a9a0112c.zip
SONAR-21234 Remove extra space at the bottom of projects list
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx
index 9d61328036c..43fea64f1e3 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx
+++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx
@@ -33,6 +33,7 @@ import ProjectCard from './project-card/ProjectCard';
const PROJECT_CARD_HEIGHT = 181;
const PROJECT_CARD_MARGIN = 20;
+const PROJECT_LIST_FOOTER_HEIGHT = 90;
interface Props {
cardType?: string;
@@ -100,7 +101,11 @@ export default class ProjectsList extends React.PureComponent<Props> {
height={height}
overscanRowCount={2}
rowCount={this.props.projects.length + 1}
- rowHeight={PROJECT_CARD_HEIGHT + PROJECT_CARD_MARGIN}
+ rowHeight={({ index }) =>
+ index === this.props.projects.length
+ ? PROJECT_LIST_FOOTER_HEIGHT
+ : PROJECT_CARD_HEIGHT + PROJECT_CARD_MARGIN
+ }
rowRenderer={this.renderRow}
style={{ outline: 'none' }}
tabIndex={-1}