Read more about aggregationField
prop for different components:
Why?
Grouping records usually refers to the process of combining multiple records into a single result, or consolidating many similar records into two or three results. This kind of de-duplication or aggregation of results has three primary use cases:
- Item Variations: where any item with variations is displayed only once. A t-shirt that comes in five colors should only appear once in the results, with all five color options displayed somewhere in the description.
- Large Records: where you first break up large record into smaller sub-records, and then during the search, if several of these sub-records match, you display the most relevant one.
- Grouping by attribute: where you group records depending on the value of one of their attributes.
How?
Let's take example of carstore-dataset. We have different brands of cars, but we only want to show distinct brands.
This can be achieved by defining aggregationField
prop in ReactiveList
as brand.keyword
.
###Without aggregationField
###With aggregationField