Actions

go-back

4min

This action is used to return to the previous page. Most jigs include this action automatically as an arrow to the left of the title of the jig. This action can be used in a list of actions, such as swipeable and rightElement, or used together with another action, where go-back is called after the main action and returns the user to the previous page.

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

A go-back action associated with another action under onSuccess can only be used with dynamic data.

Examples and code snippets 

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 when pressed. In this case, the use of the function is unnecessary because as we can see in the screenshot 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 and the arrow has the same function as the "Go back" button below.

Examples:

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

go-back-action.jigx

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.

left
right

rightElement go-back
rightElement go-back


In this example, we use the go-back action as the rightElement in the list-item component. 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.

goback-right-element


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

go-back-on-success




Updated 04 Nov 2024
Doc contributor
Did this page help you?