on-change
Optional
Default: unset
Triggered when: Specific per component. Please see the table below.
Event parameters:
$value
or$object
- The current bound valueoldValue
- The current bound value before the changenewValue
- The current bound value after the change
Return value: Specific per component (based on field type). Please see the table below.
on-change
is an event that calls a JS/TS $:function
or navigation. See more details:
Component-specific details
Component | Triggered when | Return value |
---|---|---|
The device updates the current location. | Location object, e.g. Limitation: Capturing the | |
A file is uploaded, or deleted when in display mode. | Attachment id, or | |
A photo is captured or selected from gallery, updated, or deleted when in display mode. | Attachment id, or | |
A signature is captured, updated or deleted when in display mode. | Attachment id, or | |
A date is selected, updated or cleared. | Selected date, or | |
A date and time is selected, updated or cleared. | Selected date and time, or | |
An item is checked or unchecked. | Array containing the selected values. E.g. | |
A new selection is made, or the selection is cleared. | Selected object or an array of selected objects, or | |
A row is selected. | Selected object, E.g. | |
A barcode is scanned. | String containing the scanned barcode. E.g. | |
A new selection is made, or the selection is cleared. | Key of the selected option (string), or | |
A new selection is made. | Key of the selected option (string), or | |
Text is entered, updated or cleared. | String containing the entered text. E.g. | |
The toggle state is updated. |
|
Example:
Last updated