Skip to content

Commit

Permalink
STCOM-1224 Include pagination height in MCL container height calculat…
Browse files Browse the repository at this point in the history
…ion (#2165)

* STCOM-1224 Include pagination height in MCL container height calculation

* STCOM-1224 Ignore paginationHeight for pagingTypes other than PREV_NEXT
  • Loading branch information
BogdanDenis authored Nov 6, 2023
1 parent 95268dd commit e88756b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Make `<SearchField>` support input and textarea as an input field. Refs STCOM-1220.
* Add support for new match option `containsAll` in `<AdvancedSearch>`. Refs STCOM-1223.
* 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.0](https://github.com/folio-org/stripes-components/tree/v12.0.0) (2023-10-11)
[Full Changelog](https://github.com/folio-org/stripes-components/compare/v11.0.0...v12.0.0)
Expand Down
4 changes: 3 additions & 1 deletion lib/MultiColumnList/MCLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit e88756b

Please sign in to comment.