@aplus-frontend/ui
Version:
16 lines (15 loc) • 997 B
TypeScript
import { Ref, ShallowRef } from 'vue';
import { ApFormInternalInstance, ApFormExpose } from '../../ap-form';
import { EditableAgGridProps } from '../editable/interface';
import { Key } from '@aplus-frontend/antdv/es/_util/type';
export declare const useEditableApi: <RecordType>(props: EditableAgGridProps<RecordType>, formApi: Ref<ApFormExpose | undefined> | ApFormInternalInstance | undefined, tableData: Ref<RecordType[]>, updateTableData?: (newData: RecordType[]) => void) => {
add: (defaultValue?: Partial<RecordType>, insertIndex?: number) => void;
addMultiple: (list: number | Partial<RecordType>[], insetIn?: "prefix" | "suffix") => void;
remove: (data: RecordType | RecordType[]) => void;
removeByKey: (key: Key | Key[]) => void;
getRowData: (index: number) => RecordType;
getRowsData: () => RecordType[];
setRowData: (index: string | number, payload: any, merge?: boolean) => void;
clear: () => void;
refreshRowIds: ShallowRef<string[], string[]>;
};