Result Templates Manager
Manager in which result templates can be registered. Registered templates can then be selected for a given result based on a list of conditions and priority.
Creates a new
Returns ResultTemplatesManager<Content, State>
Registers any number of result templates.
How to deal with spread syntax?
Returns the highest priority template for which the given result satisfies all conditions. In the case where satisfied templates have equal priority, the one that was registered first is returned.
content (Content, required)
Stored content of the template.
conditions (ResultTemplateCondition, required)
List of conditions to fulfill for a template to be selected. See Result Templates Helpers for easy ways to generate conditions.
0 based value which the manager will fallback to when multiple conditions are fullfilled. Higher numbers have priority and are evaluated first.
List of index fields that are necessary to render the template.