Interface: WizardContextValue
Defined in: types.ts:99
Context value exposed by WizardProvider.
Properties
currentStep
currentStep:
number
Defined in: types.ts:103
Current active step index.
getStepStatus
getStepStatus: (
params) =>WizardStepStatus
Defined in: types.ts:140
Get the status of a step by index.
Parameters
| Parameter | Type |
|---|---|
params | { stepIndex: number; } |
params.stepIndex | number |
Returns
goToNext
goToNext: () =>
Promise<void>
Defined in: types.ts:111
Navigate to the next step.
Returns
Promise<void>
goToPrevious
goToPrevious: () =>
void
Defined in: types.ts:115
Navigate to the previous step.
Returns
void
goToStep
goToStep: (
params) =>Promise<void>
Defined in: types.ts:122
Navigate to a completed or active step. A step after the current one
(reached before, then left by going back) is reached as if clicking
"Next" through each step on the way: the first validation or onNext
that refuses stops there.
Parameters
| Parameter | Type |
|---|---|
params | { stepIndex: number; } |
params.stepIndex | number |
Returns
Promise<void>
isFirstStep
isFirstStep:
boolean
Defined in: types.ts:126
Whether the wizard is on the first step.
isLastStep
isLastStep:
boolean
Defined in: types.ts:130
Whether the wizard is on the last step.
isNavigating
isNavigating:
boolean
Defined in: types.ts:136
Whether goToNext is waiting on the step's validation or onNext. While
true, the next/finish button shows its loading state, and every
navigation (next, previous, a step click) is refused.
setStepValidation
setStepValidation: (
validate) =>void
Defined in: types.ts:145
Register a validation function for the current step. This allows step content components to provide their own validation logic.
Parameters
| Parameter | Type |
|---|---|
validate | () => boolean | Promise<boolean> |
Returns
void
totalSteps
totalSteps:
number
Defined in: types.ts:107
Total number of steps.