@open-tender/utils
Version:
A library of utils for use with Open Tender applications that utilize our cloud-based Order API.
12 lines (11 loc) • 747 B
TypeScript
/// <reference types="react" />
import { ConfigFulfillment, FormFields, OrderFulfillment, RequestError, RequestStatus } from '@open-tender/types';
export declare const useOrderFulfillmentForm: (orderId: number, fulfillment: OrderFulfillment | null, loading: RequestStatus, error: RequestError, update: (orderId: number, data: OrderFulfillment) => void, settings: ConfigFulfillment, showAllFields?: boolean) => {
submitRef: import("react").MutableRefObject<HTMLButtonElement | null>;
fields: FormFields;
data: OrderFulfillment;
errors: Record<string, string>;
submitting: boolean;
handleChange: (name: string, value: string | number | boolean) => void;
handleSubmit: (evt?: React.FormEvent<HTMLFormElement>) => void;
};