ResourceColumnReorder
Feature
Allows user to reorder resource columns in vertical mode by dragging them. The feature fires various events during the drag operation (see events below). To get notified about the actual resource reorder, you can also listen to the change event on the scheduler ResourceStore.
This feature is disabled by default and only works when the scheduler is in vertical mode.
Basic usage
const scheduler = new Scheduler({
mode : 'vertical',
features : {
resourceColumnReorder : true
}
});
Validation
You can validate the drag drop flow by listening to the resourceColumnDrag event:
const scheduler = new Scheduler({
mode : 'vertical',
features : {
resourceColumnReorder : true
},
listeners : {
resourceColumnDrag({ context }) {
// Prevent dropping on certain resources
if (context.insertBefore?.isSpecialResource) {
context.valid = false;
}
}
}
});
Useful configs and functions
| Member | Description |
|---|---|
| resourceColumnDragStart | Fires when column drag starts |
| resourceColumnDrag | Fires during column drag |
| resourceColumnBeforeDropFinalize | Async finalizer before drop |
| resourceColumnDrop | Fires when column is dropped |
| resourceColumnDragAbort | Fires when drag is aborted |
See also
- ResourceModel - Resource data model
- ResourceStore - Resource store
- Scheduler - Scheduler widget
No results
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
A CSS selector used to determine which elements can initiate a drag operation.
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of ResourceColumnReorder class, or subclass thereof.
-
Identifies an object as an instance of ResourceColumnReorder class, or subclass thereof.
Functions
Functions are methods available for calling on the class-
init( )private
Initialize drag & drop (called on first paint)