v7.3.0

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

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • targetSelector : String.b-resource-header-cell
    internal

    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

Functions

Functions are methods available for calling on the class
    • init( )
      private

      Initialize drag & drop (called on first paint)

    Events

    Events are triggered for certain actions in this class and can be listened for to react to those actions in your code

    Event handlers

    Event handlers are callbacks called as a result of certain actions in this class

    CSS variables

    CSS variables that can be set to adjust appearance
    Name Description
    --b-resource-column-reorder-box-shadow Drag proxy box shadow
    --b-resource-column-reorder-indicator-color Drop indicator color
    --b-resource-column-reorder-indicator-invalid-color Drop indicator color when invalid
    --b-resource-column-reorder-indicator-size Drop indicator size (width for vertical line)
    --b-resource-column-reorder-proxy-opacity Opacity of the drag proxy (column being dragged)
    id: resourceColumnReorder

    Source path

    Scheduler/feature/ResourceColumnReorder.js

    Demo

    examples/vertical

    Contents