UNPKG

tdesign-react

Version:
22 lines (21 loc) 835 B
import { PrimaryTableProps } from '../interface'; import { AllValidateResult } from '../../form'; import { PrimaryTableRowEditContext, TableRowData, TableErrorListMap } from '../type'; export type ErrorListObjectType = PrimaryTableRowEditContext<TableRowData> & { errorList: AllValidateResult[]; }; export interface TablePromiseErrorData { errors: ErrorListObjectType[]; errorMap: TableErrorListMap; } export declare function useEditableRow(props: PrimaryTableProps): { errorListMap: TableErrorListMap; editableKeysMap: { [key: string]: boolean; [key: number]: boolean; }; validateRowData: (rowValue: any) => Promise<unknown>; validateTableData: () => Promise<unknown>; clearValidateData: () => void; onRuleChange: (context: PrimaryTableRowEditContext<TableRowData>) => void; };