Type alias RenderFieldsFunction<TFieldValues>

RenderFieldsFunction<TFieldValues>: ((params) => React.ReactNode)

Type representing the function to render form fields.

Type Parameters

  • TFieldValues extends FieldValues

    The type of field values.

Type declaration

    • (params): React.ReactNode
    • Parameters

      • params: {
            columns?: number;
            fluid: boolean;
            formDisabled?: boolean;
            formMethods: UseFormReturn<TFieldValues>;
            schema: IFieldSchema<TFieldValues>[];
            submitButtonLoading?: boolean;
            visibleFields: Set<Path<TFieldValues>>;
        }
        • Optional columns?: number

          Number of columns in the layout.

        • fluid: boolean

          Whether the layout is fluid (responsive).

        • Optional formDisabled?: boolean

          Whether the form is disabled.

        • formMethods: UseFormReturn<TFieldValues>

          Methods from react-hook-form for managing the form state.

        • schema: IFieldSchema<TFieldValues>[]

          The schema defining the fields in the form.

        • Optional submitButtonLoading?: boolean

          Whether the submit button is loading.

        • visibleFields: Set<Path<TFieldValues>>

          The set of visible fields in the form.

      Returns React.ReactNode