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.

Configs

79

Common

listenersEvents

Other

Width for each resource column.

This is used for resources which are not are loaded with a columnWidth. This config may be ignored if resources do not fill the view and fillWidth is set to true.

Automatically resize resource columns to fill available width. Set to false to always respect the configured columnWidth.

This is ignored if any resources are loaded with columnWidth.

fitWidth: Boolean= falseAlso a property

Automatically resize resource columns to always fit available width.

This is ignored if any resources are loaded with columnWidth.

headerRenderer: function

Custom header renderer function. Can be used to manipulate the element config used to create the element for the header:

new Scheduler({
  resourceColumns : {
    headerRenderer({ elementConfig, resourceRecord }) {
      elementConfig.dataset.myExtraData = 'extra';
      elementConfig.style.fontWeight = 'bold';
    }
  }
});

See DomConfig for more information.

You should never modify any records inside this method.

Or as a template by returning HTML from the function:

new Scheduler({
  resourceColumns : {
    headerRenderer : ({ resourceRecord }) => `
      <div class="my-custom-template">
      ${resourceRecord.firstName} {resourceRecord.surname}
      </div>
    `
  }
});
When using `headerRenderer` no default internal markup is applied to the resource header cell, `iconCls` and imageUrl or image will have no effect unless you supply custom markup for them.
ParameterTypeDescription
paramsObject

Object containing the params below

params.resourceRecordResourceModel

Resource whose header is being rendered

params.elementConfigDomConfig

A config object used to create the element for the resource

Returns: String -

The raw HTML string to render into the header. Remember to HTML encode your content!

showAvatars: Boolean= true

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

columnWidget
rtlRTL
spanWidget

Accessibility

ariaLabelWidget
keyMapKeyMap

CSS

clsWidget
colorWidget
htmlClsWidget
styleWidget
uiWidget

DOM

adoptWidget
appendToWidget
contentWidget
datasetWidget
htmlWidget
idWidget
tagWidget
titleWidget

Float & align

alignWidget
anchorWidget
centeredWidget
draggableWidget
floatingWidget
xWidget
yWidget

Layout

alignSelfWidget
dockWidget
flexWidget
heightWidget
hiddenWidget
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
textAlignWidget
weightWidget
widthWidget

Misc

dataFieldWidget
disabledWidget
localeClassLocalizable
localizableLocalizable
maskedWidget
ownerWidget
readOnlyWidget
refWidget
rippleWidget
tabWidget
tooltipWidget

Scrolling

Properties

68

Class hierarchy

isResourceHeader: Boolean= truereadonly
Identifies an object as an instance of ResourceHeader class, or subclass thereof.
isResourceHeader: Boolean= truereadonlystatic
Identifies an object as an instance of ResourceHeader class, or subclass thereof.
isDelayableDelayable
isEventsEvents
isKeyMapKeyMap
isLocalizableLocalizable
isWidgetWidget

Other

Width for each resource column.

This is used for resources which are not are loaded with a columnWidth. This config may be ignored if resources do not fill the view and fillWidth is set to true.

Assign to toggle resource columns *fill mode. true means they will stretch (grow) to fill viewport, false that they will respect their configured columnWidth.

This is ignored if any resources are loaded with columnWidth.

Assign to toggle resource columns *fit mode. true means they will grow or shrink to always fit viewport, false that they will respect their configured columnWidth.

This is ignored if any resources are loaded with columnWidth.

$namestaticWidget
columnWidget
rtlRTL
spanWidget
typestaticWidget

Accessibility

keyMapKeyMap

CSS

clsWidget

DOM

appendToWidget
contentWidget
datasetWidget
elementWidget
htmlWidget
idWidget
styleWidget

Float & align

xWidget
yWidget

Layout

alignSelfWidget
flexWidget
heightWidget
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
widthWidget

Lifecycle

configBase

Misc

cellInfoWidget
disabledWidget
localeHelperLocalizable
localeManagerLocalizable
readOnlyWidget
refWidget
tabWidget
tooltipWidget

Visibility

hiddenWidget
isVisibleWidget

Widget hierarchy

ownerWidget
parentWidget

Functions

59

Other

Refreshes the visible headers

composeWidget
createOnFrameDelayable
disableWidget
enableWidget
focusWidget
LstaticLocalizable
maskWidget
onEvents
recomposeWidget
relayAllEvents
triggerEvents
unEvents
unmaskWidget

Configuration

applyDefaultsstaticBase

Events

Float & align

alignToWidget
setXYWidget
showByWidget
toFrontWidget

Lifecycle

createstaticWidget
destroystaticBase
initClassstaticWidget

Misc

attachTooltipstaticWidget
fromElementstaticWidget
fromSelectorstaticWidget
getByIdstaticWidget
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Visibility

hideWidget
showWidget

Widget hierarchy

closestWidget
containsWidget
ownsWidget
queryWidget
queryAllWidget
upWidget

Events

14
catchAllEvents
destroyEvents
focusInWidget
focusOutWidget
hideWidget
paintWidget
readOnlyWidget
recomposeWidget
resizeWidget
showWidget

Event handlers

14

Typedefs

6

CSS variables

23
NameDescription
--b-resource-header-avatar-sizeResource header avatar size (vertical mode)
--b-resource-header-gapResource header inner gap (vertical mode)
--b-resource-header-avatar-background-colorResource header avatar background color (vertical mode)

Inherited