EntitiesOption
type EntitiesOption = { onClick?: (entity: Entity) => void; onRequestPreview?: (entity: Entity) => Promise<{ preview: BasicRoot | null; }>; onTagSearch?: (query: string) => Promise<Entity[]>;};Properties
Section titled “Properties”onClick()?
Section titled “onClick()?”optional onClick: (entity: Entity) => void;Called when a rendered entity is clicked.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”void
onRequestPreview()?
Section titled “onRequestPreview()?”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”Promise<{
preview: | BasicRoot
| null;
}>
onTagSearch()?
Section titled “onTagSearch()?”optional onTagSearch: (query: string) => Promise<Entity[]>;Returns a list of entities for the input query. Powers tag autocomplete within the composer.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<Entity[]>