From f9deebc4558057ca6f1a521152e56527a9a0112c Mon Sep 17 00:00:00 2001 From: Ambroise C Date: Thu, 18 Jan 2024 16:09:54 +0100 Subject: [PATCH] SONAR-21234 Remove extra space at the bottom of projects list --- .../src/main/js/apps/projects/components/ProjectsList.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 { 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} -- 2.39.5