diff --git a/projects/ng-aquila/src/table/resizing/header-resize.directive.ts b/projects/ng-aquila/src/table/resizing/header-resize.directive.ts index 1a97d5e7c..d33ba901b 100644 --- a/projects/ng-aquila/src/table/resizing/header-resize.directive.ts +++ b/projects/ng-aquila/src/table/resizing/header-resize.directive.ts @@ -1,5 +1,5 @@ import { DOCUMENT } from '@angular/common'; -import { AfterViewChecked, Directive, ElementRef, Inject, OnDestroy, OnInit, Renderer2 } from '@angular/core'; +import { Directive, ElementRef, Inject, OnDestroy, OnInit, Renderer2 } from '@angular/core'; import { fromEvent, merge, Subject } from 'rxjs'; import { distinctUntilChanged, map, switchMap, takeUntil, tap } from 'rxjs/operators'; @@ -12,7 +12,7 @@ import { NxHeaderCellDirective } from '../header-cell.directive'; }, standalone: true, }) -export class NxHeaderResizeDirective implements OnInit, OnDestroy, AfterViewChecked { +export class NxHeaderResizeDirective implements OnInit, OnDestroy { private mousedown = fromEvent(this.elementRef.nativeElement, 'mousedown'); private touchstart = fromEvent(this.elementRef.nativeElement, 'touchstart'); @@ -63,8 +63,4 @@ export class NxHeaderResizeDirective implements OnInit, OnDestroy, AfterViewChec this._destroyed.next(); this._destroyed.complete(); } - - ngAfterViewChecked() { - this.renderer.setStyle(this.header.elementRef.nativeElement, 'position', 'relative'); - } } diff --git a/projects/ng-aquila/src/table/table.component.scss b/projects/ng-aquila/src/table/table.component.scss index e8bcac48c..d9e40d794 100644 --- a/projects/ng-aquila/src/table/table.component.scss +++ b/projects/ng-aquila/src/table/table.component.scss @@ -32,6 +32,7 @@ $sticky-shadow-size: nx-spacer(3xs); text-align: left; white-space: nowrap; vertical-align: top; + position: relative; &:first-child { padding-left: $horizontal-padding-edges;