@fundamental-ngx/platform 0.56.0-rc.9 → 0.56.0

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.
@@ -3581,11 +3581,12 @@ class TableVirtualScrollDirective extends TableVirtualScroll {
3581
3581
  return;
3582
3582
  }
3583
3583
  let rowHeight = this.rowHeight + 1;
3584
+ const tableContainerEl = this._table.tableContainer.nativeElement;
3584
3585
  if (this._tableService.poppingColumns$().length > 0) {
3585
- rowHeight =
3586
- rowHeight +
3587
- this._table.tableContainer.nativeElement.getElementsByClassName('fd-table__row--secondary')[0]
3588
- .clientHeight;
3586
+ const secondaryRows = tableContainerEl.getElementsByClassName('fd-table__row--secondary');
3587
+ if (secondaryRows[0]) {
3588
+ rowHeight = rowHeight + secondaryRows[0].clientHeight;
3589
+ }
3589
3590
  }
3590
3591
  const rowsVisible = this._table._tableRowsVisible;
3591
3592
  const currentlyRenderedRows = this._table.getCurrentlyRenderedRows();
@@ -3593,7 +3594,7 @@ class TableVirtualScrollDirective extends TableVirtualScroll {
3593
3594
  const scrollTop = this._table.tableScrollable.getScrollTop();
3594
3595
  let startNodeIndex = Math.floor(scrollTop / rowHeight) - this.renderAhead;
3595
3596
  startNodeIndex = Math.max(0, startNodeIndex);
3596
- let visibleNodeCount = Math.ceil(this._table.tableContainer.nativeElement.clientHeight / rowHeight) + 2 * this.renderAhead;
3597
+ let visibleNodeCount = Math.ceil(tableContainerEl.clientHeight / rowHeight) + 2 * this.renderAhead;
3597
3598
  visibleNodeCount = Math.min(totalNodeCount - startNodeIndex, visibleNodeCount);
3598
3599
  this.virtualScrollTransform$.next(startNodeIndex * rowHeight);
3599
3600
  // Simple caching to avoid unnecessary re-renderings