Actions

reset-state

3min

Reset-state action is typically used to reset the state of the key inside the file and can be used further to reset the state of UI components and forms. To understand how to use states, see State.

Configuration options

There are multiple ways to set up a reset-state action within a :

  1. As onFocus action that will be executed.
  2. As onRefresh action that will be executed.
  3. As the main action on the , and when you press the action, the reset-state action will be executed.
  4. The onPress and onChange actions will be executed when you trigger the onPress or onChange event.

Examples and code snippets 

Reset-state onFocus/onRefresh
Reset-state onFocus/onRefresh

  1. Reset-state action is used when the onFocus/onRefresh event is triggered to reset the component's state or key.
  2. You can specify instanceId, this will be the name of the UI component.
  3. And you need to specify the key, which will be the value of the UI component or the name of the key that you want to reset.

Example: See the full example in GitHub.

onFocus.jigx
onRefresh.jigx

Reset-state action
Reset-state action

  1. Reset-state action is used as the primary action on the jig, to reset-state of the component in the jig and its value.
  2. You can specify instanceId, this will be the name of the UI component
  3. And you need to specify the key, which will be the value of the UI component that you want to reset

Example:

See the full example in GitHub.

action.jigx

Reset-state onPress/onChange
Reset-state onPress/onChange

  1. Reset-state action used on the list as onPress or onChange action, to reset-state of the component.
  2. You can specify instanceId, this will be the name of the UI component.
  3. And you need to specify the state, which will be the value of the UI component that you want to reset

Example:

See the full example in GitHub.

onPress.jigx
onChange.jigx




Updated 30 Sep 2024
Doc contributor
Did this page help you?