EventSelection
Mixin
Mixin that tracks event or assignment selection by clicking on one or more events in the scheduler. It supports single selection, multi-select with Ctrl/Cmd click, and range selection with Shift click.
const scheduler = new Scheduler({
multiEventSelect : true,
listeners : {
eventSelectionChange({ selection }) {
console.log('Selected events:', selection);
}
}
});
See also
- EventNavigation - Keyboard event navigation
- Scheduler - Scheduler widget
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
Collection to store selection.
-
CSS class to add to other instances of a selected event, to highlight them.
-
CSS class to add to selected events.
-
Configure as
falseto preserve selection when clicking the empty schedule area. -
Configure as
trueto deselect a selected event upon click. -
Configure as
true, or set property totrueto disable event selection. -
Configure as
true, or set property totrueto highlight dependent events as well when selecting an event. -
Configure as
true, or set property totrueto highlight dependent events as well when selecting an event. -
This flag controls whether Scheduler should preserve its selection of events when loading a new dataset (if selected event ids are included in the newly loaded dataset).
-
Set to
falseto not select the row/resource when clicking the empty area in a time axis cell.Has a corresponding runtime selectResourceOnScheduleClick property.
-
Configure as
trueto triggerselectionChangewhen removing a selected event/assignment.
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of EventSelection class, or subclass thereof.
-
Identifies an object as an instance of EventSelection class, or subclass thereof.
-
Set to
falseto not select the row/resource when clicking the empty area in a time axis cell.Has a corresponding selectResourceOnScheduleClick config.
-
The assignments which are selected.
-
The events which are selected.
Functions
Functions are methods available for calling on the class-
onAssignmentChange( )private
Assignment change listener to remove events from selection which are no longer in the assignments.
-
onAssignmentSelectionClick( )private
Mouse listener to update selection.
-
Deselects all events and assignments.