UNPKG

opti-form

Version:

Form logic for React with immutable controls and value

11 lines 703 B
import { TControlValue } from "./TControlValue"; import { TControl } from "./controls"; /** * OptiForm applies value updates asynchronously for optimization reasons. * However due to that it might make regular inputs (the ones where user types the value) behave weirdly. * If caret is in the end of the input everything will work fine, * but if user moves caret anywhere else and then types, caret will be moved to the end. * This hook solves this specific issue. You do not need to use it with any other type of input. */ export declare function useInputValue<T>(control: TControl<T>): readonly [TControlValue<T>, (newValue: TControlValue<T>) => void]; //# sourceMappingURL=useInputValue.d.ts.map