grouper-mixin

The grouper mixin is a post-processor mixin, compatible with list-mixin. It provides the ability to group resources, depending of the values of one of their properties.

Attributes

group-by

The resources will be grouped by the field you give as a parameter.

In this example, the mixin will render one <div> for each different date, and put the corresponding resources inside.

<solid-display
    data-src=http://server/events/"
    fields="name, date"
    group-by="date"
></solid-display>

When used with the pagination, each group is paginated.

You can also use the dot syntax to group by a nested resource. For example, set the group-by attribute to nested_resource.name.

group-widget

Available from version 0.13 default: solid-group-default

The name of the widget to use as a group widget. It takes the name of the group as a value and put content in a div[data-content]. Here is an example of a custom group widget:

<solid-widget name="custom-group">
    <template>
        <h2>${value}</h2>
        <section data-content></section>
    </template>
</solid-widget>

group-class

The name of the class to add on each group widget.