AboutSupportDeveloper GuideVersion 19.2.11

Interface PresentationTemplateFragment<T>

Type Parameters

Hierarchy

Properties

dataKey: string

Data key of the template fragment.

The data associated with this fragment will be looked up in templateData map with this key.

Example:

const myTemplateLayout = {
type: FragmentTypes.Text,
dataKey: 'info',
}

const searchResult: CLISearchResultCustom = {
//...
template: CLITemplate.Custom,
templateContent: {
layout: myTemplateLayout,
data: {
info: 'My Custom Search Result Info',
}
}
};
optional?: boolean

Optional flag.

If a template fragment is flagged as optional, The service will not require the fragment's dataKey to exist in templateData. If a fragment is optional and its data is missing, the fragment will be omitted quietly by the renderer.

style?: Record<string, string | number>

CSS style properties of the fragment.

All the available custom template fragments support all of the React's inline style properties (with camelCase keys)

Note: "position: fixed" is disallowed as a fragment style.

type: T

Type of the template fragment.