TaskItems

Configs

4

Items to add to each card's body.

Supplied keys are used to bind to a field on the task record, supplied values are used to configure the items.

You are always required to supply a type, see the docs for each item type for more information on available configs.

const taskBoard = new TaskBoard({
   bodyItems : {
       status : { type : 'text' }
   }
});

For more information, see the class description above.

Items to add to each card's footer.

Supplied keys are used to bind to a field on the task record, supplied values are used to configure the items.

You are always required to supply a type, see the docs for each item type for more information on available configs.

const taskBoard = new TaskBoard({
   footerItems : {
       status : { type : 'text' }
   }
});

For more information, see the class description above.

Items to add to each card's header.

Supplied keys are used to bind to a field on the task record, supplied values are used to configure the items.

You are always required to supply a type, see the docs for each item type for more information on available configs.

const taskBoard = new TaskBoard({
   headerItems : {
       status : { type : 'text' }
   }
});

For more information, see the class description above.

processItems: function

A function called on each render before adding items to a tasks card, allowing runtime manipulation of them.

const taskBoard = new TaskBoard({
    processItems({ bodyItems, taskRecord }) {
       // Remove the progress item for done tasks
       if (taskRecord.status === 'done') {
           bodyItems.progress = null;
       }
    }
});

NOTE: The function is only intended for manipulating the passed items, you should not update the passed taskRecord in it since updating records triggers another round of rendering.

ParameterTypeDescription
contextObject
context.headerItemsObject<String, TaskItemOptions>

Item config objects for the task header, keyed by ref

context.bodyItemsObject<String, TaskItemOptions>

Item config objects for the task body, keyed by ref

context.footerItemsObject<String, TaskItemOptions>

Item config objects for the task footer, keyed by ref

context.taskRecordTaskModel

Record representing task to be rendered

Returns: Boolean | null -

Returning false from this function prevents the menu being shown

Properties

5

Class hierarchy

isTaskItems: Boolean= truereadonly
Identifies an object as an instance of TaskItems class, or subclass thereof.
isTaskItems: Boolean= truereadonlystatic
Identifies an object as an instance of TaskItems class, or subclass thereof.

Task content

Items to add to each card's body.

As an object keyed by field names, values are TaskItem configs.

Reassigning this property merges the supplied object with the configured items:

const taskBoard = new TaskBoard({
   bodyItems : {
       status : { type : 'text' }
   }
});

taskBoard.bodyItems = {
    status : { hidden : true },
    tags   : { type : 'tags' }
};

// Results in:
//
// bodyItems = {
//     status : { type : 'text', hidden: true }
//     tags   : { type : 'tags' }
// }
}

Items in card footer.

As an object keyed by field names, values are TaskItem configs.

Reassigning this property merges the supplied object with the configured items:

const taskBoard = new TaskBoard({
   footerItems : {
       status : { type : 'text' }
   }
});

taskBoard.footerItems = {
    status : { hidden : true },
    tags   : { type : 'tags' }
};

// Results in:
//
// footerItems = {
//     status : { type : 'text', hidden: true }
//     tags   : { type : 'tags' }
// }
}

Items in card header.

As an object keyed by field names, values are TaskItem configs.

Reassigning this property merges the supplied object with the configured items:

const taskBoard = new TaskBoard({
   headerItems : {
       status : { type : 'text' }
   }
});

taskBoard.headerItems = {
    status : { hidden : true },
    tags   : { type : 'tags' }
};

// Results in:
//
// headerItems = {
//     status : { type : 'text', hidden: true }
//     tags   : { type : 'tags' }
// }
}