@altiore/form
Version:
Form helper for building powerful forms
3 lines (2 loc) • 443 B
TypeScript
import { FieldMeta, ListInterface, ValidateFunc } from '../../../../@common/types';
export declare const useList: <ArrayItemProps extends Record<string, any> = Record<string, any>>(name: string, validators: Array<ValidateFunc>, fieldMeta?: FieldMeta, setFormContextItems?: (fieldName: string, setItems: (i: number[]) => number[], getErrors: (i: number[]) => string[], defaultValue?: any) => void) => [ListInterface<ArrayItemProps>, string[]];