stateChange method
flite function stateChange (info: Object): void
This interface method is invoked whenever the state of a component or one of its children changes. You will often want to make some updates to the component when its state changes. See the State API documentation for a list of the component state constants available for use by this function. See the Component Lifecycle section for more detailed information on component states.
Parameters
info: Object |
An object containing the new state of the component and the child component, if the child’s state was affected. See Info Properties for details. |
Info Properties
state: String |
New state of this component. See State API documentation for a list of possible values. |
child: Object |
An object containing two properties:
child.key: String: The key of the child layer undergoing the state change, allowing you to find the child layer's container or description if necessary.
child.state: String: The new state of the child layer with the specified key. See State API documentation for a list of possible values.
|
trigger: Object |
A MetricsHelper object representing the event that triggered this state change. Use this if a new event needs to be logged in response to the state change. |