Skip to main content

previousAction()

Last updated 4/07/2024

The

previousAction()
is a function on the
Five
object that returns to the previously selected or replaced action. This will restore selected actions by default, however, by setting
revertSelect
to
false
, you can restore replaced actions in a dashboard as well.

Optionally, you can pass in a number of actions you want to go back, in the case of more than one action being selected or replaced.

info
You can find an example of
selectAction()
and
previousAction()
being used together in one of our learning resources.

Available

Client

Function Signature
previousAction(revertSelect: boolean [, num: number = 1]) : void;

ParameterTypeDescription
revertSelect
booleanIf true, restore action will restore selected actions, otherwise it will restore replaced actions
num
numberThe number of actions to go back

Examples

previousAction()