Signature
Import
- Component
- Plugin
To ensure optimal bundle sizes,
see Optimize build size.
Vue
About this widget
Theais-query-rule-custom-data widget displays custom data from Rules.
You can use this widget to display banners or recommendations returned by rules when they match search parameters.
Examples
HTML
Props
function
A function that receives the list of items before they are displayed.
It should return a new array with the same structure.
Use this to transform, filter, or reorder the items.The function also has access to the full
results data,
including all standard response parameters
and parameters from the helper,
such as disjunctiveFacetsRefinements.Vue
Customize the UI
The slot to override the complete DOM output of the widget.The following example assumes a rule returned this custom data.When you implement this slot,
none of the other slots will change the output,
as the default slot surrounds them.Scope
JSON
items: object[]. The items returned by the rules.
Vue
The slot to override the DOM output of the item returned by the rules.The following example assumes a Query Rule returned this custom data.Scope
JSON
item: object. The item returned by the Rules.
Vue
HTML output
HTML