v7.3.0

TaskDrag
Feature

This feature allows cards on the TaskBoard to be dragged across swimlanes and columns but also vertically in the same column to change the order:

When a task is dropped, its columnField, swimlaneField and/or weight fields are updated to reflect the new location.

Note that when moving a task to a catch-all column (a column with id *), the task's field will be set to null.

Drag events

The different stages of a drag operation trigger different events, in order of appearance:

Event Description
beforeTaskDrag Preventable event fired before a drag starts
taskDragStart Fired when dragging starts
taskDrag Fired when movement during a drag will lead to changes
beforeTaskDrop Preventable event fired before finalizing a valid drop. Allows async listeners
taskDrop Fired after finalizing a valid drop
taskDragAbort Fired when a drag is aborted (ESC, drop out of bounds or by a listener)
taskDragEnd Fired when a started drag ends, no matter the outcome

The beforeTaskDrop is useful for example to request user confirmation for a drop:

This feature is enabled by default.

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • The number of milliseconds that must elapse after a touchstart event before it is considered a drag. If movement occurs before this time, the drag is aborted. This is to allow touch swipes and scroll gestures.

Properties

Properties are getters/setters or publicly accessible variables on this class
  • isTaskDrag : Booleantrue
    READONLY
    static
    ADVANCED
    Identifies an object as an instance of TaskDrag class, or subclass thereof.

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-task-board-task-drag-card-box-shadow Dragged cards box shadow
--b-task-board-task-drag-card-transform Dragged cards transform (slight rotation by default)
--b-task-board-task-drag-drop-background Drop indicator background
--b-task-board-task-drag-drop-border Drop indicator border
--b-task-board-task-drag-invalid-background Invalid drop indicator background
--b-task-board-task-drag-invalid-color Invalid drop indicator border color
id: taskDrag

Source path

TaskBoard/feature/TaskDrag.js

Contents