Skip to main content

resetNudge(id, step?)

Resets a nudge to a specific step. If no step is provided, resets the nudge to initial step.

Example

Reset nudge to first step

const nudgeId = 123;
window.CommandBar.resetNudge(nudgeId);

Set nudge to a certain step

const nudgeId = 123;
window.CommandBar.resetNudge(nudgeId, 2); // set nudge to step 3; nudge steps are zero-index

Method parameters

id Required

number

The ID of the nudge. To get this ID, go to the nudges section in the editor, click the ... next to a nudge, then click Copy ID.

step

number

The step to set the nudge to. This is zero-indexed — to reset a nudge to the second step, for example, pass a 1 here. To reset a nudge to the first step, you can skip this argument.