Skip to main content

update-column

Patches an existing column with the provided partial. The store merges the new fields into the existing column config by id. If no column matches the given id, the action is silently ignored.

Usage

type UpdateColumnPayload = {
id: ColumnID;
column: Partial<ColumnConfig>;
};
FieldTypeDescription
idstring | numberThe column to update
columnPartial<ColumnConfig>Fields to merge (label, css, cardLimit, collapsed, etc.)

Trigger

api.exec("update-column", {
id: "doing",
column: { label: "Work in Progress", cardLimit: 5 },
});

Observe

api.on("update-column", ev => {
console.log("Column updated:", ev.id, ev.column);
});

Intercept

api.intercept("update-column", ev => {
// prevent collapsing a specific column
if (ev.id === "doing" && ev.column.collapsed) return false;
});

Component handler

<Kanban
{cards}
{columns}
onupdatecolumn={(ev) => console.log("Column changed:", ev.id)}
/>
  • Columns guide — column setup, layout, and runtime updates
  • columns — column definitions in board order