From df46e5ba30cf01686553133f43950f33c85b0448 Mon Sep 17 00:00:00 2001 From: eah Date: Fri, 30 Aug 2019 08:38:34 +0200 Subject: [PATCH 1/4] virtual scroller height set to max of virtualScrollHeightOverride or totalCollapsedHeight --- package.json | 2 +- src/components/datatable/ScrollableView.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index ef36dae955..0f3bcd885c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "primereact-fork", - "version": "3.1.9-fork-1.0.1", + "version": "3.1.9-fork-1.0.2", "homepage": "/primereact", "repository": { "type": "git", diff --git a/src/components/datatable/ScrollableView.js b/src/components/datatable/ScrollableView.js index 12968ff860..6aece98f7f 100644 --- a/src/components/datatable/ScrollableView.js +++ b/src/components/datatable/ScrollableView.js @@ -67,13 +67,13 @@ export class ScrollableView extends Component { if(!this.props.frozen) { this.alignScrollBar(); - - if(this.props.virtualScroll) { + + if (this.props.virtualScroll) { + const collapsedHeight = this.props.totalRecords * this.props.virtualRowHeight; if (this.props.virtualScrollHeightOverride) { - this.virtualScroller.style.height = this.props.virtualScrollHeightOverride + 'px' - } - else { - this.virtualScroller.style.height = this.props.totalRecords * this.props.virtualRowHeight + 'px'; + this.virtualScroller.style.height = Math.max(collapsedHeight, this.props.virtualScrollHeightOverride) + 'px'; + } else { + this.virtualScroller.style.height = collapsedHeight + 'px'; } } } From ae9c33995faf2e3d3fb14d0c8266bc1e7e60d314 Mon Sep 17 00:00:00 2001 From: eah Date: Fri, 30 Aug 2019 09:00:02 +0200 Subject: [PATCH 2/4] virtual scroller height set to max of virtualScrollHeightOverride or totalCollapsedHeight --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0f3bcd885c..ad26785bab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "primereact-fork", - "version": "3.1.9-fork-1.0.2", + "version": "3.2.0-SNAPSHOT", "homepage": "/primereact", "repository": { "type": "git", From 8e1b72764a2b5248fd6cc22b628e0e09073c19a0 Mon Sep 17 00:00:00 2001 From: eah Date: Fri, 30 Aug 2019 09:00:58 +0200 Subject: [PATCH 3/4] virtual scroller height set to max of virtualScrollHeightOverride or totalCollapsedHeight --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ad26785bab..eb4f3ce408 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "primereact-fork", + "name": "primereact", "version": "3.2.0-SNAPSHOT", "homepage": "/primereact", "repository": { From bf7f8cc0e5dc73e5d0454cce3582ff07176325c1 Mon Sep 17 00:00:00 2001 From: eah Date: Fri, 30 Aug 2019 09:01:57 +0200 Subject: [PATCH 4/4] virtual scroller height set to max of virtualScrollHeightOverride or totalCollapsedHeight --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index eb4f3ce408..0f3bcd885c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "primereact", - "version": "3.2.0-SNAPSHOT", + "name": "primereact-fork", + "version": "3.1.9-fork-1.0.2", "homepage": "/primereact", "repository": { "type": "git",