type ExtensionFieldConfiguration: object;
Type declaration
customFieldDisplaySettings?
optional customFieldDisplaySettings: CustomFieldDisplaySettings;
Optional properties to configure how fields are displayed
defaultSearchCallback?
optional defaultSearchCallback: string;
Optional callback that's used when a field name may not map to any field defined in fieldValueSearchCallbacks.
Useful for when you don't know the field name ahead of time (e.g. a dynamically generated field name).
fieldValueSearchCallbacks?
optional fieldValueSearchCallbacks: Map<string, string>;
Specify callbacks for searching for legal values for the given fields.
For example, a Task collection may have an Assignee field that references a User collection,
but you don't import all the users in the entire source data set. Here, you can provide a way
to search for legal values for the Assignee field, similar to the ExtensionCardFieldDefinition.search
functionality.
Register a search callback using LucidCardIntegrationRegistry.registerFieldSearchCallback, then set
the returned string as a value in this Map. The inputSoFar parameter passed to the callback will
be all the current field values on the item being edited.
getAllFields()
getAllFields: (dataSource) => Promise<string[] | FieldDescriptor[]>;
Callback to provide a list of all supported field names for the card integration.
Parameters
| Parameter | Type |
|---|---|
dataSource | DataSourceProxy |
Returns
Promise<string[] | FieldDescriptor[]>
getFieldsToEdit()?
Experimental
optional getFieldsToEdit: (fieldId) => Promise<ExtensionCardFieldsGroup[]>;
Callback to determine which fields should be shown and editable when a user clicks on a field element in certain
areas of a card's UI. For example, clicking on a badge showing a cumulative score could open a panel with
inputs to edit the fields that contribute to that score.
Parameters
| Parameter | Type | Description |
|---|---|---|
fieldId | string | The field that was clicked (depending on the field, this could be human-readable or a UUID) |
Returns
Promise<ExtensionCardFieldsGroup[]>
getListItemsForField()?
Experimental
optional getListItemsForField: (dataSource, item, fieldId) => Promise<ExtensionDataPanelListItem[]>;
Callback to determine what supplemental information should be shown when a user clicks on a field element in certain
areas of the cards UI. For example, clicking on a badge showing a count could open a panel showing items that
contribute to that count.
Parameters
| Parameter | Type |
|---|---|
dataSource | DataSourceProxy |
item | DataItemProxy |
fieldId | string |
Returns
Promise<ExtensionDataPanelListItem[]>
nonCustomizableFields?
optional nonCustomizableFields: string[];
List of field names that will not be displayed in the settings panel or edit panel, so its badge position cannot be changed by user
Order matters here, as the order of the fields in this list will be used to determine the order of the badges in the card
onSelectedFieldsChange()?
optional onSelectedFieldsChange: (dataSource, selectedFields) => Promise<void>;
Callback that handled changes in the fields the user wants to be displayed in the card integration.
If this callback is not provided then the user will not be shown the modal to configure fields.
Parameters
| Parameter | Type |
|---|---|
dataSource | DataSourceProxy |
selectedFields | string[] |
Returns
Promise<void>