UNPKG

goobs-frontend

Version:

A comprehensive React-based libary for building modern web applications

21 lines 913 B
export interface FieldValuesBinding<V> { /** The current record (empty object when unset / not a plain object). */ values: Record<string, V>; /** The current keys of the record. */ keys: string[]; /** Read a single entry (undefined when absent). */ getValue: (key: string) => V | undefined; /** Set a single entry (merges into the existing record). */ setValue: (key: string, value: V) => void; /** Remove a single entry. */ removeKey: (key: string) => void; /** Replace the whole record. */ setAll: (record: Record<string, V>) => void; /** * The dotted field-name for entry `key` (e.g. `"fieldValues.summary"`). * Compose a child field's `name` as `fieldName(key)`. */ fieldName: (key: string) => string; } export declare function useFieldValues<V = unknown>(name: string): FieldValuesBinding<V>; //# sourceMappingURL=useFieldValues.d.ts.map