UNPKG

@alauda/ui

Version:

Angular UI components by Alauda Frontend Team.

25 lines (24 loc) 1.1 kB
import { AfterViewInit, ElementRef, OnDestroy } from '@angular/core'; import { NgControl } from '@angular/forms'; import * as i0 from "@angular/core"; export interface AutoSizeValue { minRows: number; maxRows?: number; } /** * Directive to automatically resize a textarea to fit its content. */ export declare class AutosizeDirective implements AfterViewInit, OnDestroy { private readonly elRef; private readonly ngControl; private _autoSize; private readonly destroy$$; get autoSize(): AutoSizeValue | ""; set autoSize(value: AutoSizeValue | ''); constructor(elRef: ElementRef<HTMLTextAreaElement>, ngControl: NgControl); resizeTextarea(): void; ngAfterViewInit(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<AutosizeDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<AutosizeDirective, "textarea[autosize][ngModel],textarea[autosize][formControl],textarea[autosize][formControlName]", ["TextareaAutosize"], { "autoSize": { "alias": "autosize"; "required": false; }; }, {}, never, never, true, never>; }