cps-ui-kit 0.134.0 → 0.135.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.
@@ -5724,11 +5724,14 @@ class CpsTreeTableComponent {
5724
5724
  this.defScrollHeightPxInitial = 0;
5725
5725
  this.defScrollHeight = '';
5726
5726
  this.scrollbarWidth = 0;
5727
+ this.scrollbarVisible = true;
5727
5728
  this.resizeObserver = new ResizeObserver((entries) => {
5728
5729
  entries.forEach((entry) => {
5729
5730
  const body = entry.target;
5730
- const sbarVisible = body.scrollHeight > body.clientHeight;
5731
- let wScroll = sbarVisible ? this.scrollbarWidth : 0;
5731
+ this.scrollbarVisible = body.scrollHeight > body.clientHeight;
5732
+ if (this.scrollbarVisible && this.virtualScroll)
5733
+ this.scrollableBody.style.setProperty('overflow', 'auto', 'important');
5734
+ let wScroll = this.scrollbarVisible ? this.scrollbarWidth : 0;
5732
5735
  if (wScroll > 0)
5733
5736
  wScroll -= 1;
5734
5737
  this.headerBox.style.paddingRight = `${wScroll}px`;
@@ -5922,6 +5925,8 @@ class CpsTreeTableComponent {
5922
5925
  this.customSortFunction.emit(event);
5923
5926
  }
5924
5927
  _recalcVirtualHeight() {
5928
+ if (!this.scrollbarVisible && this.virtualScroll)
5929
+ this.scrollableBody.style.setProperty('overflow', 'hidden', 'important');
5925
5930
  setTimeout(() => {
5926
5931
  if (this.virtualScroll && this.defScrollHeight) {
5927
5932
  this._updateVirtualScrollItemSize();