Interface: PropertyWithOptions<T>¶
Defined in: schema.ts:236
A property with a list of valid options for its value.
Extended by¶
Type Parameters¶
| Type Parameter |
|---|
T extends PackFormulaResult |
Properties¶
options?¶
optionaloptions:PropertySchemaOptions<T>
Defined in: schema.ts:264
A list of values or a formula that returns a list of values to suggest when someone edits this property.
Example¶
properties: {
color: {
type: coda.ValueType.String,
codaType: coda.ValueHintType.SelectList,
mutable: true,
options: ['red', 'green', 'blue'],
},
user: {
type: coda.ValueType.String,
codaType: coda.ValueHintType.SelectList,
mutable: true,
options: async function (context) {
let url = coda.withQueryParams("https://example.com/userSearch", { name: context.search });
let response = await context.fetcher.fetch({ method: "GET", url: url });
let results = response.body.users;
return results.map(user => {display: user.name, value: user.id})
},
},
}
requireForUpdates?¶
optionalrequireForUpdates:boolean
Defined in: schema.ts:271
Blocks updates from being sent with a blank value.