changeState( )


Change the multi-state box's current state to a specific state.

The changeState() function returns a Promise that is resolved when the multi-state box finishes moving from the current state to the state referred to by stateReference. stateReference can be a state object or a state id.

You can retrieve State objects to pass to the stateReference parameter from your multi-state box using the currentState or states properties.

Note:
If you call changeState() on a child multi-state box, it doesn't run until the parent box moves to the state where the child box is displayed.

Method Declaration
Copy
Method Parameters
stateReferenceunionRequired

The state to move to. Either the id of the state or a State object from the multi-state box.

Returns
Return Type:Promise<State>
Was this helpful?
Yes
No