TaskItem

Abstract base class for task items, lightweight "widgets" that can be added to tasks using the headerItems, bodyItems and footerItems configs.

Configs

6
cls: String

CSS class to add.

editor: String | Object= text

Widget type or config to use as the editor for this item. Used in the inline task editor. Set to null to not use an editor for this item.

field: String

Task field whose value item will act on (usually display it). Defaults to use the key in the items object.

const taskBoard = new TaskBoard({
   features : {
       taskItems : {
           items : {
               // Will use "prio" as its field
               prio  : { type : 'textitem' },
               // Will use "status" as its field
               state : { type : 'textitem', field : 'status' }
           }
       }
   }
});
hidden: Boolean

Specify true to hide the task item.

order: Number= 1

Flex order, can be used to re-order task items.

style: String | Object

Style definition in string or object form.

const taskBoard = new TaskBoard({
   features : {
       taskItems : {
           items : {
               prio  : { type : 'textitem', style : { color : 'red' } }
           }
       }
   }
});

Typedefs

1

Config options for all TaskItems combined. See respective item classes for more information.

ParameterTypeDescription
typeString

Type of the item

fieldString

Field to display in the item. Usually inferred from the key when supplying items

styleString | Object

Style definition in string or object form

clsString

CSS class to add

orderNumber

Flex order, can be used to re-order task items

hiddenBoolean

Specify true to hide the task item

editorString | Object

Widget type or config to use as the editor for this item. Used in the inline task editor. Set to null to not use an editor for this item

baseUrlString

For type : 'image' - Url prepended to this items value

templatefunction

For type : 'template' - Template function used to generate task content

template.value*

Data value passed for template function

template.taskRecordTaskModel

Task record passed for template function

template.returnsString

Return value for template function

maxNumber

For type : 'progress' and type : 'rating' - Max value

textFieldString

For type : 'todoList' - Name of a property on a todo item to display as its text

checkedFieldString

For type : 'todoList' - Name of a property on a todo item to use for the checkbox

clsFieldString

For type : 'todoList' - Name of a property on a todo item whose value will be added as a CSS class to the todo item

maxAvatarsNumber

For type : 'resourceAvatars' - Maximum avatars to display by default.

overlapBoolean

For type : 'resourceAvatars' - Specify true to slightly overlap avatars for tasks

textPropertyString

For type : 'tags' - Property used to display the tag text

clsPropertyString

For type : 'tags' - Property used to add a CSS class to each tag

separatorString

For type : 'tags' - Property used to split a value string into tags

jsx*

React Element (JSX)