Choices expression
A JavaScript expression executed in Field Execution Context. An expression should return an array of objects representing the options available for selection. Each option should contain:
Name Type | Return type | Description |
---|---|---|
|
| a property of any type except array (it can refer to an existing object which is not created in Choices expression) |
|
| required if |
Option in its original form will be available in the Option template scope. You can define any additional properties to later use them in the Option template.
Examples
// doesn't work:
[
{ value: { name: 'A' }, label: 'a' },
{ value: { name: 'B' }, label: 'b' }
]
// works:
[
{ value: wizardState.objectA, label: 'a' },
{ value: wizardState.objectB, label: 'b' }
]
[
{ value: 'A' , label: 'a' },
{ value: 'B' , label: 'b' }
]