diff --git a/CHANGELOG.md b/CHANGELOG.md index 876d88f40..a1861465e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Add z-index of 1 to callout out to have it always render on top of sibling elements. Fixes STCOM-1217. * Ensure CSS visibility of datepicker's year input number spinner. Refs STCOM-1225. +* Include pagination height in MCL container height calculation. Refs STCOM-1224. ## [12.0.2](https://github.com/folio-org/stripes-components/tree/v12.0.2) (2023-10-20) [Full Changelog](https://github.com/folio-org/stripes-components/compare/v12.0.1...v12.0.2) diff --git a/lib/MultiColumnList/MCLRenderer.js b/lib/MultiColumnList/MCLRenderer.js index 9830dd0ef..55d3224a5 100644 --- a/lib/MultiColumnList/MCLRenderer.js +++ b/lib/MultiColumnList/MCLRenderer.js @@ -1749,9 +1749,11 @@ class MCLRenderer extends React.Component { if (height !== undefined) { // if we have a totalCount, we can set size based on that... if not, the receivedRows count. const scrollBarHeight = 20; + const paginationHeight = pagingType === pagingTypes.PREV_NEXT ? this.paginationHeight : 0; + newHeight = Math.max( ((pagingType !== pagingTypes.SCROLL ? receivedRows : totalCount || receivedRows) * minimumRowHeight), - (height - this.headerHeight - scrollBarHeight) + (height - this.headerHeight - scrollBarHeight - paginationHeight) ); const rowContainerStyles = {