import type { BaseKey, BaseRecord, HttpError, UseFormProps } from "@refinedev/core"; import type { ButtonProps } from "antd"; import type { useTableProps, useTableReturnType } from "../useTable"; import { type UseFormReturnType } from "../../form/useForm"; export type useEditableTableReturnType = useTableReturnType & UseFormReturnType & { saveButtonProps: ButtonProps & { onClick: () => void; }; cancelButtonProps: ButtonProps & { onClick: () => void; }; editButtonProps: (id: BaseKey) => ButtonProps & { onClick: () => void; }; isEditing: (id: BaseKey) => boolean; }; type useEditableTableProps = Omit, "successNotification" | "errorNotification"> & UseFormProps & { /** * When true, row will be closed after successful submit. */ autoSubmitClose?: boolean; }; /** * `useEditeableTable` allows you to implement edit feature on the table with ease, * on top of all the features that {@link https://refine.dev/docs/api-reference/core/hooks/useTable/ `useTable`} provides. * `useEditableTable` return properties that can be used on Ant Design's {@link https://ant.design/components/table/ ``} * and {@link https://ant.design/components/form/ ``} components. * * @see {@link https://refine.dev/docs/api-reference/antd/hooks/table/useTable/} for more details. * * @typeParam TQueryFnData - Result data returned by the query function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`} * @typeParam TError - Custom error object that extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#httperror `HttpError`} * @typeParam TVariables - Values for params * @typeParam TSearchVariables - Values for search params * @typeParam TData - Result data returned by the `select` function. Extends {@link https://refine.dev/docs/api-reference/core/interfaceReferences#baserecord `BaseRecord`}. Defaults to `TQueryFnData` * */ export declare const useEditableTable: ({ autoSubmitClose, ...props }?: useEditableTableProps) => useEditableTableReturnType; export {}; //# sourceMappingURL=useEditableTable.d.ts.map