Value Change
aura:valueChange
Indicates that a value has changed.
This event is fired when an attribute value changes. Handle this event using the aura:handler tag. A component can have multiple aura:handler tags to detect changes to different attribute values.
This example updates an attribute value, which fires the aura:valueChange event.
The client-side controller actions trigger the value change and handle it.
The valueChange event gives you access to the previous value (oldValue) and the current value (value) in the handler action. In this example, oldValue returns true and value returns false.
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
expression | The expression that triggered the value change. | string | ||
index | If the handler was registered through an ArrayValue or MapValue, the name/index of the changed Value in that ArrayValue or MapValue. | string | ||
oldvalue | The previous value that was changed. | object | ||
value | The new value. | object |