@nova-ui/bits
Version:
SolarWinds Nova Framework
45 lines (44 loc) • 1.84 kB
TypeScript
import { CdkVirtualForOf, CdkVirtualScrollViewport } from "@angular/cdk/scrolling";
import { AfterViewInit, OnDestroy, Renderer2 } from "@angular/core";
import { Observable } from "rxjs";
import { TableComponent } from "../table.component";
import * as i0 from "@angular/core";
export declare enum TableVirtualScrollHeaderPosition {
Native = 0,
Sticky = 1
}
export declare class TableStickyHeaderDirective implements AfterViewInit, OnDestroy {
private renderer;
private viewport;
table: TableComponent<unknown>;
virtualFor: CdkVirtualForOf<unknown>;
set tableStickyHeader(isSticky: boolean);
private _sticky;
private headPosition;
private stickyHeadContainer?;
private headRef?;
private bodyRef?;
private tableElRef?;
private userProvidedHeight;
private readonly unsubscribe$;
private headResizeObserver;
private origViewportHeight;
private get viewportEl();
private get isInitialized();
constructor(renderer: Renderer2, viewport: CdkVirtualScrollViewport);
ngAfterViewInit(): void;
ngOnDestroy(): void;
setNative(): void;
setSticky(): void;
updateContainerToFitHead: () => void;
updateViewportHeightOnHeadResize(): void;
handleColumnsUpdate$: () => Observable<unknown>;
private assignRequiredProperties;
private syncColumnWidths;
private syncHorizontalScroll;
private createStickyHeaderContainer;
private updateNativeHeaderPlaceholder;
private updateHeadPosition;
static ɵfac: i0.ɵɵFactoryDeclaration<TableStickyHeaderDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<TableStickyHeaderDirective, "cdk-virtual-scroll-viewport[tableStickyHeader]", never, { "tableStickyHeader": { "alias": "tableStickyHeader"; "required": false; }; }, {}, ["table", "virtualFor"], never, false, never>;
}