canGoBack
Control whether users can leave a jig, with an optional confirmation modal.
Last updated
Was this helpful?
Was this helpful?
title: Edit notes
type: jig.default
canGoBack:
when: =$not(@ctx.jig.state.dirty)
confirm:
title: Discard unsaved changes?
description: Your notes will be lost.
confirm: Discard
cancel: Keep editing
style:
isDanger: truetitle: Check-in kiosk
type: jig.default
canGoBack:
when: falsetitle: Profile
type: jig.default
canGoBack:
when: =@ctx.components.profile-form.state.isDirty
confirm:
title: Leave this form?
description: Your changes have not been saved.
confirm: Leave
cancel: Stay
children:
- type: component.form
instanceId: profile-form
options:
isDiscardChangesAlertEnabled: false
children:
- type: component.text-field
instanceId: first-name
options:
label: First nametitle: Edit notes
type: jig.default
canGoBack:
when: =$not(@ctx.jig.state.dirty)
confirm:
title: Discard unsaved changes?
description: Your notes will be lost.
confirm: Discard
cancel: Keep editing
actions:
- children:
- type: action.go-back
options:
title: Go back