For the complete documentation index, see llms.txt. This page is also available as Markdown.

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:

  1. As a separate action or in the action list.

  2. As a swipeable action in the left or right direction.

  3. As rightElement in the list.

  4. As an associated action in the action list.

  5. By using the to property to navigate to the previous screen, the home screen, or a specific jig using the jigId in the navigation stack.

Some properties are common to all actions, see Common action properties for the list of actions and their configuration options.

Core structure

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.

Other options

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.

go-back supports these navigation targets:

  • to: previous - goes to the previous screen. This is the default behavior.

  • to: home - goes to the Home screen.

  • to: jigId - goes back to a specific jig already in the navigation stack.

  • to: =@ctx.solution.state.targetJigId - uses an expression for dynamic navigation.

Considerations

  • If to is omitted, go-back behaves exactly as before and returns to the previous screen.

  • When to references a specific jigId, the action finds that jig in the navigation stack and removes all screens above it.

  • Use to: home when you want to return directly to the Home screen instead of stepping back screen by screen.

  • Use expressions in to when the navigation target must be determined at runtime.

Examples and code snippets

go-back as an action

go-back as an action
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:

See the full example using static data in GitHub. See the full example using dynamic data in GitHub.

go-back swipeable left/right

swipeable go-back
swipeable go-back

This example uses the go-back action as a swipeable property. We can choose the swipe direction left or right. After pressing the button, we return to the previous page.

Examples left: See the full example using static data in GitHub. See the full example using dynamic data in GitHub.

Examples right: See the full example using static data in GitHub. See the full example using dynamic data in GitHub.

go-back rightElement

rightElement go-back
rightElement go-back

In this example, we use the go-back action as the rightElement in the list-item component to go to the home screen. There is a button for each item.

Examples: See the full example using static data in GitHub. See the full example using dynamic data in GitHub

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.

go-back onSuccess
go-back onSuccess

Last updated

Was this helpful?