Allows configuration of how navigating between steps should happen.
For example, it can be used to control what happens when the user navigates back from a step.
| Property | Type | Required | Description |
|---|---|---|---|
back | Navigation.BackBehavior | No | Configure custom back behavior which overrides any native back behavior of the client. |
| No | Configure the behavior of the navigation stack when this step is presented.
|
Describes how back navigation should be handled. If omitted, clients will handle back navigation natively. This means they will return to the previous step if possible, or exit the flow.
navigation {
back {
title = "Back"
action {
url = "/payment-method-selection"
}
}
}When to use
- When navigating back requires a new step from the server, e.g. if the content is invalid and needs to be regenerated.
When not to use
- If the step the user just navigated from is still valid, and is a logical place to go back to, then this property should be omitted so the native behavior is left intact.
| Property | Type | Required | Description |
|---|---|---|---|
action | Action | Yes | The Action triggered when the user navigates back. Note that this action will not validate the model against the schema before submitting. |
title | String | No | A title describing the back action. |
Describes the behavior of the navigation stack when the step is presented.
When to use
- When an intermediate step (e.g. a step that displays a loader) which should not be kept on the stack, a
remove-previousstack behaviour could be used. - When returning to previous steps is invalid, for example on a success screen after an operation has been completed, it might make sense to completely clear the stack with a
remove-allstack behavior. - When the current step is being replaced, to give the appearance of refreshing, a
replace-currentstack behavior could be used.
| Value | Description |
|---|---|
default | The step is pushed onto the navigation stack. |
remove-all | The step is pushed onto the navigation stack and all previous steps are removed. If there are no previous steps, then this behaves the same as default. |
remove-previous | The step is pushed onto the navigation stack and the previous step is removed. If there is no previous step, then this behaves the same as default. |
replace-current | The step replaces the current step on the navigation stack, acting as an update to the current step. If there is no current step, then this behaves the same as default. |