TimeAxisHeaderMenu
Feature
Adds scheduler specific menu items to the timeline header context menu.
Default time axis header menu items
Here is the list of menu items provided by this and other features:
| Reference | Text | Weight | Feature | Description |
|---|---|---|---|---|
eventsFilter |
Filter tasks | 100 | EventFilter | Submenu for event filtering |
>nameFilter |
By name | 110 | EventFilter | Filter by name |
Removed when a mode of a Calendar |
||||
zoomLevel |
Zoom | 200 | This feature | Submenu for timeline zooming |
>zoomSlider |
- | 210 | This feature | Changes current zoom level |
dateRange |
Date range | 300 | This feature | Submenu for timeline range |
setRange |
Time range | 300 | Only added when a mode of a Calendar |
Sets the Scheduler'srange |
| Replaces the Date range menu item | ||||
>startDateField |
Start date | 310 | This feature | Start date for the timeline |
>endDateField |
End date | 320 | This feature | End date for the timeline |
>leftShiftBtn |
< | 330 | This feature | Shift backward |
>todayBtn |
Today | 340 | This feature | Go to today |
>rightShiftBtn |
> | 350 | This feature | Shift forward |
currentTimeLine |
Show current timeline | 400 | TimeRanges | Show current time line |
- >
- first level of submenu
Customizing the menu items
The menu items in the TimeAxis Header menu can be customized, existing items can be changed or removed, and new items can be added. This is handled using the items config of the feature.
Add extra items:
const scheduler = new Scheduler({
features : {
timeAxisHeaderMenu : {
items : {
extraItem : {
text : 'Extra',
icon : 'fa fa-fw fa-flag',
onItem() {
...
}
}
}
}
}
});
Remove existing items:
const scheduler = new Scheduler({
features : {
timeAxisHeaderMenu : {
items : {
zoomLevel : false
}
}
}
});
Customize existing item:
const scheduler = new Scheduler({
features : {
timeAxisHeaderMenu : {
items : {
zoomLevel : {
text : 'Scale'
}
}
}
}
});
Customizing submenu items:
const scheduler = new Scheduler({
features : {
timeAxisHeaderMenu : {
items : {
dateRange : {
menu : {
items : {
todayBtn : {
text : 'Now'
}
}
}
}
}
}
}
});
Manipulate existing items:
const scheduler = new Scheduler({
features : {
timeAxisHeaderMenu : {
// Process items before menu is shown
processItems({ items }) {
// Add an extra item dynamically
items.coolItem = {
text : 'Cool action',
onItem() {
// ...
}
}
}
}
}
});
The `processItems` implementation my be an `async` function which `awaits` a result to mutate the `items` object.
Full information of the menu customization can be found in the "Customizing the Event menu, the Schedule menu, and the TimeAxisHeader menu" guide.
Video guides
This feature is enabled by default
Useful configs and functions
| Member | Description |
|---|---|
| items | Menu items configuration object |
| timeAxisHeaderMenuBeforeShow | Fires before menu is shown |
| timeAxisHeaderMenuItem | Fires when item is clicked |
| timeAxisHeaderMenuShow | Fires after menu is shown |
See also
- EventFilter - Event filtering from the header menu
- TimeRanges - Time ranges (current timeline menu item)
- HeaderMenu - Grid base class
No results
Configs
Configs are options you supply in a configuration object when creating an instance of this classProperties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of TimeAxisHeaderMenu class, or subclass thereof.
-
Identifies an object as an instance of TimeAxisHeaderMenu class, or subclass thereof.