Skip to content

resourceGroupField

A field of the resources: resource views put a head over each run of resources sharing its value.

Typestring | undefined
Defaultnot set
Live update (update())Yes
Declared inpackages/core/src/kernel.ts

With resourceGroupField: 'service', the columns of a resource view (the rows of a timeline) gather under a head per service, in the order the groups first come. The field is read from the resource, then its extendedProps.

Grouping applies to the roots of the tree; each root’s children stay in its group. In the Pro’s timeline a group can be shut (collapsedGroups). The head’s look is the application’s through hooks.resourceGroupHeader.

import { createCalendar } from '@dzcalendar/dom';
createCalendar(element, {
timeZone: 'Europe/Paris',
initialView: 'resourceTimeGridDay',
resources: [
{ id: 'benali', title: 'Dr Benali', service: 'Cardiology' },
{ id: 'room1', title: 'Room 1', service: 'Imaging' },
],
resourceGroupField: 'service',
});

In Angular and Vue it goes in options; in React it is a prop.

The columns under a head per service.