Skip to content

EntitiesOption

type EntitiesOption = {
onClick?: (entity: Entity) => void;
onRequestPreview?: (entity: Entity) => Promise<{
preview: BasicRoot | null;
}>;
onTagSearch?: (query: string) => Promise<Entity[]>;
};
optional onClick: (entity: Entity) => void;

Called when a rendered entity is clicked.

Parameter Type

entity

Entity

void


optional onRequestPreview: (entity: Entity) => Promise<{
preview: | BasicRoot
| null;
}>;

Use the Widget Studio (https://widget-studio.vercel.app/) to design previews and copy the generated JSON into your integration.

Parameter Type

entity

Entity

Promise<{ preview: | BasicRoot | null; }>


optional onTagSearch: (query: string) => Promise<Entity[]>;

Returns a list of entities for the input query. Powers tag autocomplete within the composer.

Parameter Type

query

string

Promise<Entity[]>