@fundamental-ngx/platform 0.43.42 → 0.43.43

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.
@@ -2560,6 +2560,12 @@ class TableVirtualScrollDirective extends TableVirtualScroll {
2560
2560
  /** @hidden */
2561
2561
  ngOnDestroy() {
2562
2562
  this._focusableGridSubscription?.unsubscribe();
2563
+ if (this.scrollWholeRows) {
2564
+ this._table.tableContainer.nativeElement.removeEventListener('wheel', this._wheelScrollListenerFunction, {
2565
+ passive: false
2566
+ });
2567
+ this._table.tableScrollMockContainer.nativeElement.removeEventListener('scroll', this._mockScrollbarListenerFunction, { passive: false });
2568
+ }
2563
2569
  }
2564
2570
  /** Sets table reference. */
2565
2571
  setTable(table) {
@@ -2588,7 +2594,7 @@ class TableVirtualScrollDirective extends TableVirtualScroll {
2588
2594
  }
2589
2595
  }
2590
2596
  const totalNodeCount = this._table._tableRowsVisible.length;
2591
- let visibleNodeCount = Math.floor(this._table.tableContainer.nativeElement.clientHeight / this.rowHeight);
2597
+ let visibleNodeCount = this._getNumberOfRowsToDisplay();
2592
2598
  visibleNodeCount = Math.min(totalNodeCount - startNodeIndex, visibleNodeCount);
2593
2599
  this.virtualScrollTotalHeight = totalNodeCount * this.rowHeight - visibleNodeCount * this.rowHeight;
2594
2600
  this._setRows(startNodeIndex);
@@ -2652,13 +2658,15 @@ class TableVirtualScrollDirective extends TableVirtualScroll {
2652
2658
  const tableContainer = this._table.tableContainer.nativeElement;
2653
2659
  let tableHeight = tableContainer.clientHeight;
2654
2660
  tableHeight = tableHeight - tableContainer.querySelector('thead').clientHeight;
2655
- const numberOfRows = Math.floor(tableHeight / (this.rowHeight + 2));
2661
+ const numberOfRows = Math.floor(tableHeight / this.rowHeight);
2662
+ let retVal;
2656
2663
  if (this._table._tableRowsVisible.length < numberOfRows) {
2657
- return this._table._tableRowsVisible.length;
2664
+ retVal = this._table._tableRowsVisible.length;
2658
2665
  }
2659
2666
  else {
2660
- return numberOfRows;
2667
+ retVal = numberOfRows;
2661
2668
  }
2669
+ return retVal;
2662
2670
  }
2663
2671
  /**
2664
2672
  * @hidden