go-back
This action is used to return to a previous point in the navigation stack. Most jigs include this action automatically as an arrow to the left of the jig title. You can use go-back in an action list, in swipeable, in rightElement, or together with another action.
By default, go-back returns the user to the previous screen. You can also configure it to return to the Home screen or to a specific jig already in the navigation stack.
Configuration options
A go-back action can be set up in various ways:
As a separate action or in the action list.
As a
swipeableaction in the left or right direction.As
rightElementin the list.As an associated action in the action list.
By using the
toproperty to navigate to thepreviousscreen, thehomescreen, or a specific jig using thejigIdin the navigation stack.
Some properties are common to all actions, see Common action properties for the list of actions and their configuration options.
to
Optional navigation target. Use previous to go to the previous screen, home to go to the Home screen, or provide a specific jigId already in the navigation stack. If omitted, the default behavior is previous.
title
Provide the action button with a title, for example, Go back.
icon
Select an icon to display when the action is configured as the secondary button or in a header action.
isHidden
false hides the action button, true shows the action button. The default setting is true.
style
isDanger - Styles the action button in red or your brand's designated danger color. isDisabled - Displays the action button as greyed out. isPrimary - Styles the action button in blue or your brand's designated primary color. isSecondary - Sets the action as a secondary button, accessible via the ellipsis. The icon property can be used when the action button is displayed as a secondary button.
Considerations
If
tois omitted,go-backbehaves exactly as before and returns to the previous screen.When
toreferences a specificjigId, the action finds that jig in the navigation stack and removes all screens above it.Use
to: homewhen you want to return directly to the Home screen instead of stepping back screen by screen.Use expressions in
towhen the navigation target must be determined at runtime.
Examples and code snippets
go-back as an action

The simplest example of a go-back action is to use it as a separate action. When configured, a button will appear at the bottom which will return us to the previous page, home or a specific jig when pressed. In this case, there is an arrow to the left in the upper left corner. This means that this jig already has a go-back action automatically in it to go back to the previous screen, the "Go back" button below takes you back to a specific jig.
Examples:
go-back swipeable left/right

go-back rightElement

go-back-on-success
In this example, we use the action.go-back with onSuccess to take you back to the main list after signing a form.
Examples: See the full example using static data in GitHub.

Last updated
Was this helpful?