Skip to content

Commit

Permalink
chore(*): Fix the tests. Add a check for rem invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
mddragnev committed Jan 10, 2025
1 parent 54ca89e commit 728d38d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export class IgxComboItemComponent extends IgxDropDownItemComponent {
/** @hidden @internal */
@HostBinding('style.height.rem')
public get _itemHeightToRem() {
return rem(this.itemHeight);
if (this.itemHeight) {
return rem(this.itemHeight);
}
}

@HostBinding('attr.aria-label')
Expand Down
6 changes: 4 additions & 2 deletions projects/igniteui-angular/src/lib/services/overlay/overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,10 @@ export class IgxOverlayService implements OnDestroy {
// Get the size before moving the container into the overlay so that it does not forget about inherited styles.
this.getComponentSize(info);
this.moveElementToOverlay(info);
// Update the container size after moving.
info.elementRef.nativeElement.parentElement.style.setProperty('--ig-size', info.size);
// Update the container size after moving if there is size.
if (info.size) {
info.elementRef.nativeElement.parentElement.style.setProperty('--ig-size', info.size);
}
this.contentAppended.emit({ id: info.id, componentRef: info.componentRef });
info.settings.scrollStrategy.initialize(this._document, this, info.id);
info.settings.scrollStrategy.attach();
Expand Down

0 comments on commit 728d38d

Please sign in to comment.