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.

NameDescriptionTypeDefaultRequired
expressionThe expression that triggered the value change.string
indexIf the handler was registered through an ArrayValue or MapValue, the name/index of the changed Value in that ArrayValue or MapValue.string
oldvalueThe previous value that was changed.object
valueThe new value.object