Interface: StringWithOptionsSchema¶
core.StringWithOptionsSchema
A schema representing a value with selectable options.
Hierarchy¶
-
BaseStringSchema
<SelectList
> -
PropertyWithAutocompleteWithOptionalDisplay
<string
>
↳ StringWithOptionsSchema
Properties¶
allowNewValues¶
• Optional
allowNewValues: boolean
Allow custom, user-entered strings in addition to options.
Defined in¶
codaType¶
• codaType: SelectList
Instructs Coda to render this value as a select list.
Overrides¶
BaseStringSchema.codaType
Defined in¶
description¶
• Optional
description: string
A explanation of this object schema property shown to the user in the UI.
If your pack has an object schema with many properties, it may be useful to explain the purpose or contents of any property that is not self-evident.
Inherited from¶
BaseStringSchema.description
Defined in¶
options¶
• Optional
options: PropertySchemaOptions
<string
| { display
: string
; value
: string
}>
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})
},
},
}
Inherited from¶
PropertyWithAutocompleteWithOptionalDisplay.options
Defined in¶
type¶
• type: String
Identifies this schema as a string.
Inherited from¶
BaseStringSchema.type