Built-In Properties
Some properties that already exist in the product are general purpose, or, are integral to the proper functioning of a widget.
The following built-in properties are supported for custom widgets:
'required'
: for data widgets, allows the app author to ensure that a value is collected. Requiredness will be enforced beyond the UI; the integrity of the data will be enforced when it is submitted to the server.'title'
: this is used in various contexts to allow for editing and display of the name of a widget instance.'seenInOverview'
: allows the app author to decide if the widget's data should be displayed in the View Data page.
Example:
const myWidgetDefinition = {
...
builtInProperties : [{ id: 'required'}, {id: 'title'}, {id: 'seenInOverview', defaultValue: true}],
...
}
Note: All widgets will be implicitly given an
ID
property. The default value of this property will be auto-incrementing unique value
based on the widget definition's label
. For example, a widget with
a label of 'Yes/No'
will result in a default ID of
'F_YesNo1'
. Similar to Leap's built-in widgets, the app author
is free to alter the ID to suit their needs.