igniteui-angular
Version:
Ignite UI for Angular is a dependency-free Angular toolkit for building modern web apps
82 lines (81 loc) • 2.1 kB
TypeScript
import { FormGroup } from '@angular/forms';
import { GridType, IRecordValidationState } from '../common/grid.interface';
import * as i0 from "@angular/core";
export declare class IgxGridValidationService {
/**
* @hidden
* @internal
*/
grid: GridType;
private _validityStates;
private _valid;
/** Gets whether state is valid.
*/
get valid(): boolean;
/**
* @hidden
* @internal
*/
create(rowId: any, data: any): FormGroup<any>;
/**
* @hidden
* @internal
*/
private addFormControl;
/**
* @hidden
* @internal
*/
private getFieldKey;
/**
* @hidden
* @internal
*/
getFormGroup(id: any): FormGroup<any>;
/**
* @hidden
* @internal
*/
getFormControl(rowId: any, columnKey: string): import("@angular/forms").AbstractControl<any, any>;
/**
* @hidden
* @internal
*/
add(rowId: any, form: FormGroup): void;
/**
* @hidden
* @internal
*/
private getValidity;
/**
* Returns all invalid record states.
*/
getInvalid(): IRecordValidationState[];
/**
* @hidden
* @internal
*/
update(rowId: any, rowData: any): void;
/**
* @hidden
* @internal
* Update validity based on new data.
*/
updateAll(newData: any): void;
/** Marks the associated record or field as touched.
* @param key The id of the record that will be marked as touched.
* @param field Optional. The field from the record that will be marked as touched. If not provided all fields will be touched.
*/
markAsTouched(key: any, field?: string): void;
/**
* @hidden
* @internal
*/
private updateStatus;
/** Clears validation state by key or all states if none is provided.
* @param key Optional. The key of the record for which to clear state.
*/
clear(key?: any): void;
static ɵfac: i0.ɵɵFactoryDeclaration<IgxGridValidationService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<IgxGridValidationService>;
}