You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,14 +112,16 @@ Used to retrieve all methods and properties related to your wizard. Make sure `W
112
112
113
113
`handleStep` is used to attach a handler to the step, can either be `async` or a `sync` function. This function will be invoked when calling `nextStep`.
114
114
115
+
Provide an optional `stepIndex` to either `nextStep` or `previousStep` to overwrite the default "step-flow" behaviour.
116
+
115
117
**Remark** - You can't use `useWizard` in the same component where `Wizard` is used.
| nextStep | () => Promise<void> | Go to the next step |
122
-
| previousStep | () => void | Go to the previous step |
123
+
| nextStep | (stepIndex?: number) => Promise<void> | Go to the next step. Overwrite the default behaviour by providing a step index|
124
+
| previousStep | (stepIndex?: number) => void | Go to the previous step. Overwrite the default behaviour by providing a step index|
123
125
| handleStep | (handler: Handler) => void | Attach a callback that will be called when calling `nextStep`. `handler` can be either sync or async |
124
126
| isLoading | boolean |\* Will reflect the handler promise state: will be `true` if the handler promise is pending and `false` when the handler is either fulfilled or rejected |
125
127
| activeStep | number | The current active step of the wizard |
0 commit comments