@fundamental-ngx/platform 0.66.0-rc.6 → 0.66.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/fundamental-ngx-platform-table-helpers.mjs +11 -4
- package/fesm2022/fundamental-ngx-platform-table-helpers.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-platform-table.mjs +10 -1
- package/fesm2022/fundamental-ngx-platform-table.mjs.map +1 -1
- package/package.json +4 -4
- package/schematics/ng-add/index.js +1 -1
- package/schematics/package.json +1 -1
|
@@ -3911,10 +3911,17 @@ class TableVirtualScrollDirective extends TableVirtualScroll {
|
|
|
3911
3911
|
}
|
|
3912
3912
|
/** @hidden */
|
|
3913
3913
|
_getNumberOfRowsToDisplay() {
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
tableHeight =
|
|
3917
|
-
|
|
3914
|
+
// The scroll viewport excludes the space occupied by a horizontal scrollbar.
|
|
3915
|
+
const scrollViewport = this._table.tableScrollable.elementRef.nativeElement;
|
|
3916
|
+
let tableHeight = scrollViewport.clientHeight;
|
|
3917
|
+
tableHeight = tableHeight - (scrollViewport.querySelector('thead')?.clientHeight ?? 0);
|
|
3918
|
+
const renderedRows = scrollViewport.querySelectorAll('tbody[fd-table-body] > tr');
|
|
3919
|
+
// Cell controls and borders can make rows taller than the configured minimum.
|
|
3920
|
+
let rowHeight = this.rowHeight;
|
|
3921
|
+
for (const row of renderedRows) {
|
|
3922
|
+
rowHeight = Math.max(rowHeight, row.offsetHeight);
|
|
3923
|
+
}
|
|
3924
|
+
const numberOfRows = Math.floor(tableHeight / rowHeight);
|
|
3918
3925
|
if (this._table._tableRowsVisible.length < numberOfRows) {
|
|
3919
3926
|
return this._table._tableRowsVisible.length;
|
|
3920
3927
|
}
|