@schema-render/form-render-react
Version:
Out-of-the-box form rendering library based on Core and Antd.
22 lines (21 loc) • 622 B
TypeScript
import type { ICoreRef } from '@schema-render/core-react';
import type { FormEvent, RefObject } from 'react';
import type { IInnerFormRenderProps } from '../typings';
interface IUseActionsParams {
props: IInnerFormRenderProps;
coreRef: RefObject<ICoreRef>;
}
/**
* 操作行为按钮事件
*/
export default function useActions({ props, coreRef }: IUseActionsParams): {
handleFormSubmit: (event: FormEvent<HTMLFormElement>) => void;
handleSubmit: () => void;
handleReset: () => void;
actionsLoading: {
submit: boolean;
reset: boolean;
};
isLoading: boolean;
};
export {};