UNPKG

@try-at-software/input-elements

Version:

A package providing different input elements that are extensible and easily configurable for your custom needs.

24 lines (23 loc) 851 B
import { IInputElement } from './IInputElement'; export declare type ResetValueOptions = { avoidFallbackToInitialValue?: boolean; }; export interface IChangingInputElement<TValue> extends IInputElement { /** * A method used to set new value, validate it and update the form. * * @param value The new value of the input element. */ setValue(value: TValue): void; /** * Use this method to set an initial value to the input element. * This should be useful for update operations. */ setInitialValue(value: TValue): void; /** * This method will reset the current value of the input element. * * @param options Additional options that can be used to refine the reset process. */ resetValue(options?: ResetValueOptions): void; }