s-private API Documentation - v3.8.1
    Preparing search index...

    Type Alias GenericFormWrapperProps<T>

    Props for the GenericFormWrapper component.

    GenericFormWrapper for the component

    type GenericFormWrapperProps<T> = {
        action: (formData: FormData) => Promise<T>;
        afterSubmit: (responseMessage: string) => void;
        children: ReactNode;
        loadingLabel?: string;
        onSubmit?: (formData: FormData) => Promise<void>;
        preservedValues?: Record<string, string>;
        saveLabel: string;
        submitLabel?: string;
    }

    Type Parameters

    • T

      The response type from the form action

    Index

    Properties

    action: (formData: FormData) => Promise<T>

    Server action to handle form submission

    afterSubmit: (responseMessage: string) => void

    Callback after form submission with response message

    children: ReactNode

    Form field components

    loadingLabel?: string

    Label shown during loading state

    onSubmit?: (formData: FormData) => Promise<void>

    Optional custom submit handler

    preservedValues?: Record<string, string>

    Pre-filled form values

    saveLabel: string

    Label for the save button (fallback)

    submitLabel?: string

    Label for the submit button