TaskBoardVirtualization
Configs
3
Configs
3Advanced
The function is called for each task as part of the render loop, and is expected to return the height in pixels for the task. Using this function is only recommended when using partial virtualized rendering, see the virtualize setting.
How the height is determined is up to the application, it could for example return a fixed value:
taskBoard = new TaskBoard({
getTaskHeight() {
return 150;
}
}
Or get the height from data:
taskBoard = new TaskBoard({
getTaskHeight(taskRecord) {
return taskRecord.myTaskHeight;
}
}
Or use some custom application logic:
taskBoard = new TaskBoard({
getTaskHeight(taskRecord) {
if (taskRecord.isCollapsed) {
return 20;
}
return taskRecord.myTaskHeight;
}
}
| Parameter | Type | Description |
|---|---|---|
taskRecord | TaskModel | The task record |
The height of the task in pixels
Other
Whether to draw cards on scroll, or only when scrolling ends.
Only applies when using partial virtualized rendering (see getTaskHeight).
Setting this to false will boost scroll performance, but cards scrolled into view will be empty outlines
until scrolling ends.
By turning on this setting you enable partial virtualized rendering for the board, which reduces initial rendering time and makes interaction less sluggish when using thousands of tasks. The tradeoff is that scrolling in most cases will be slower.
For a nice UX, it is strongly recommended to also implement a getTaskHeight function. Without it, the height of tasks out of view will be unknown and the behaviour when scrolling will be less than ideal.
Properties
5
Properties
5Advanced
The function is called for each task as part of the render loop, and is expected to return the height in pixels for the task. Using this function is only recommended when using partial virtualized rendering, see the virtualize setting.
How the height is determined is up to the application, it could for example return a fixed value:
taskBoard = new TaskBoard({
getTaskHeight() {
return 150;
}
}
Or get the height from data:
taskBoard = new TaskBoard({
getTaskHeight(taskRecord) {
return taskRecord.myTaskHeight;
}
}
Or use some custom application logic:
taskBoard = new TaskBoard({
getTaskHeight(taskRecord) {
if (taskRecord.isCollapsed) {
return 20;
}
return taskRecord.myTaskHeight;
}
}
| Parameter | Type | Description |
|---|---|---|
taskRecord | TaskModel | The task record |
The height of the task in pixels
Class hierarchy
Other
Whether to draw cards on scroll, or only when scrolling ends.
Only applies when using partial virtualized rendering (see getTaskHeight).
Setting this to false will boost scroll performance, but cards scrolled into view will be empty outlines
until scrolling ends.
By turning on this setting you enable partial virtualized rendering for the board, which reduces initial rendering time and makes interaction less sluggish when using thousands of tasks. The tradeoff is that scrolling in most cases will be slower.
For a nice UX, it is strongly recommended to also implement a getTaskHeight function. Without it, the height of tasks out of view will be unknown and the behaviour when scrolling will be less than ideal.