blessed-components - v1.25.0
    Preparing search index...

    Interface CreateStepperFormStateOptions

    Options accepted by createStepperFormState.

    interface CreateStepperFormStateOptions {
        defaultStepId?: string;
        getValues: () => FormValues;
        onComplete?: (values: FormValues) => void;
        onInvalid?: (stepId: string, errors: FormErrors) => void;
        onStepChange?: (stepId: string, previousStepId: string) => void;
        steps: readonly StepperFormStep[];
        validate?: (fieldIds: readonly string[], values: FormValues) => FormErrors;
    }

    Hierarchy (View Summary)

    Index

    Properties

    defaultStepId?: string

    Initial step id for uncontrolled state.

    getValues: () => FormValues

    Returns current form values.

    onComplete?: (values: FormValues) => void

    Called after the final step passes validation.

    onInvalid?: (stepId: string, errors: FormErrors) => void

    Called when a navigation request is blocked by validation.

    onStepChange?: (stepId: string, previousStepId: string) => void

    Called after the active step changes.

    steps: readonly StepperFormStep[]

    Ordered, non-empty steps.

    validate?: (fieldIds: readonly string[], values: FormValues) => FormErrors

    Validates registered fields and returns errors keyed by field id.