v7.3.0

ResourceHeader

Header widget that renders resource column headers and acts as the interaction point for resource columns in vertical mode. Note that it uses virtual rendering and element reusage to gain performance, only headers in view are available in DOM. Because of this you should avoid direct element manipulation, any such changes can be discarded at any time.

By default, it displays resources name and also applies its iconCls if any, like this:

<i class="iconCls">name</i>

If Scheduler is configured with a resourceImagePath the header will render miniatures for the resources, using imageUrl or image with fallback to name + resourceImageExtension for unset values.

The contents and styling of the resource cells in the header can be customized using headerRenderer:

new Scheduler({
    mode            : 'vertical',
    resourceColumns : {
        headerRenderer : ({ resourceRecord }) => `Hello ${resourceRecord.name}`
    }
}

The width of the resource columns is determined by the columnWidth config.

Useful configs and functions

Member Description
headerRenderer Custom header renderer function
showAvatars Show resource images in the header
fillWidth Auto-resize columns to fill available width
fitWidth Auto-resize columns to fit all resources
columnWidth Width for each resource column

See also

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • Resource store used to render resource headers. Assigned from Scheduler.

  • Set to false to render just the resource name, true to render an avatar (or initials if no image exists)

Properties

Properties are getters/setters or publicly accessible variables on this class
  • firstResource : Number
    private
    READONLY

    An index of the first visible resource in vertical mode

  • lastResource : Number
    private
    READONLY

    An index of the last visible resource in vertical mode

  • isResourceHeader : Booleantrue
    READONLY
    ADVANCED
    Identifies an object as an instance of ResourceHeader class, or subclass thereof.

Functions

Functions are methods available for calling on the class
    • Refreshes the visible headers

    CSS variables

    CSS variables that can be set to adjust appearance
    Name Description
    --b-resource-header-avatar-background-color Resource header avatar background color (vertical mode)
    --b-resource-header-avatar-size Resource header avatar size (vertical mode)
    --b-resource-header-gap Resource header inner gap (vertical mode)

    Source path

    Scheduler/view/ResourceHeader.js

    Contents