UNPKG

jb-form

Version:

form web component with extended feature like validation and dirty check

20 lines 811 B
import { ValidationHelper } from "jb-validation"; import { VirtualElementCallbacks, VirtualElementConfig } from "./types"; export declare class VirtualElement<TValue, TValidationValue> { #private; name: string; validation?: ValidationHelper<TValidationValue>; dom?: HTMLElement; getValue?: () => TValue; getDirtyStatus?: () => boolean; setValue?: (value: TValue) => void; setInitialValue?: (value: TValue) => void; constructor(config: VirtualElementConfig<TValue, TValidationValue>); attachCallbacks(callbacks: VirtualElementCallbacks): void; /** * @public * @description call this function when form value change so it can trigger dirty and validation check for form */ dispatchOnChange: () => void; } //# sourceMappingURL=virtual-element.d.ts.map