Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PresentationTemplateFragment<T>

Type parameters

Hierarchy

Index

Properties

dataKey

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 optional

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.

Optional style

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

type: T

Type of the template fragment.

Generated using TypeDoc