@porscheinformatik/clr-addons 15.2.1 → 15.2.2

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.
@@ -647,6 +647,7 @@ class ClrDropdownOverflowDirective {
647
647
  this.marginBottomRem = 0.1;
648
648
  this.destroy$ = new Subject();
649
649
  this.alreadyChecked = false;
650
+ this.heightFix = 27;
650
651
  }
651
652
  ngAfterContentChecked() {
652
653
  // first trigger manually because the subscription lower only triggers after first change
@@ -676,8 +677,16 @@ class ClrDropdownOverflowDirective {
676
677
  for (const item of this.getAllChildDropdownMenuItems()) {
677
678
  item.style.minHeight = itemMinHeightPx + 'px';
678
679
  }
680
+ let height = 0;
681
+ if (y + this.heightFix < window.innerHeight - y) {
682
+ height = window.innerHeight - y - this.heightFix;
683
+ }
684
+ else {
685
+ height = window.innerHeight - y;
686
+ }
679
687
  this.elRef.nativeElement.style.maxHeight =
680
- this.getMenuMaxHeight(this.clrDropdownMenuMaxHeight, window.innerHeight - y - this.convertRemToPixels(this.marginBottomRem)) + 'px';
688
+ this.getMenuMaxHeight(this.clrDropdownMenuMaxHeight, height - this.convertRemToPixels(this.marginBottomRem)) +
689
+ 'px';
681
690
  this.elRef.nativeElement.style.overflowY = 'auto';
682
691
  this.alreadyChecked = true;
683
692
  }