@proangular/pro-form
Version:
A predefined set of reactive and reusable form input components based on Angular Material.
32 lines (31 loc) • 1.27 kB
TypeScript
import { AfterViewInit } from '@angular/core';
import { AbstractControl, FormGroup } from '@angular/forms';
import * as i0 from "@angular/core";
export declare class FormDirective<T extends {
[K in keyof T]: AbstractControl;
}> implements AfterViewInit {
protected readonly formGroup: FormGroup<T>;
private readonly inputs;
private readonly inputCheckboxes;
private readonly inputChips;
private readonly inputDatepickers;
private readonly inputDropdowns;
private readonly inputRadios;
private readonly inputTextareas;
private readonly inputTimepickers;
private readonly inputToggles;
private get formInputs();
ngAfterViewInit(): void;
/** Trigger validation checks & highlight all invalid controls. */
highlightInvalidControls(): void;
/** Reset the form to its original state. */
protected reset(): void;
/**
* Scroll to the first invalid control in the form.
*
* @returns The label of the first invalid control.
*/
scrollToFirstInvalidControl(): string | null;
static ɵfac: i0.ɵɵFactoryDeclaration<FormDirective<any>, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<FormDirective<any>, "[proFormDirective][formGroup]", never, {}, {}, never, never, true, never>;
}