updateRow()
Description
Modifies the data of a row based on its ID.
Usage
updateRow({
id: string | number,
row?: object,
replace?: boolean
}): void;
Parameters
id
- (required) the identifier of the row to updaterow
- (optional) an object containing the new data for the row. The complete list of row parameters is available herereplace
- (optional) controls whether to completely replace the existing data
note
Setting the replace
parameter to true will overwrite the old data entirely with the new data. If not set or false, only the specified values will be updated.
Example
// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards,
rows
});
// update row data with the "feature" ID
board.updateRow({
id: "feature",
row: {
label: "Updated row",
collapsed: true
},
replace: true
});
Change log:
- The id and row parameters were added in v1.1
- The replace parameter was added in v1.3