Events And Methods
Get the plugin
Section titled “Get the plugin”import { KanbanPlugin } from '@revolist/revogrid-enterprise';
const plugins = await grid.getPlugins();const kanban = plugins.find((plugin) => plugin instanceof KanbanPlugin);Public methods are getCards, getConfig, getProjection, createCard, updateCard, deleteCards, moveCards, getSelectedCardIds, setSelectedCardIds, getColumnOrder, setColumnOrder, getCollapsedColumnProps, setColumnCollapsed, getSwimlaneColumnCollapsed, setSwimlaneColumnCollapsed, refresh, getDiagnostics, requestCreateCard, requestOpenCard, requestEditCard, and requestDeleteCards. Obtain the plugin from RevoGrid rather than installing reverse callbacks on the grid element.
Event reference
Section titled “Event reference”| Event | Purpose |
|---|---|
beforekanbancardmove | Cancelable proposal with cards, previous locations, target, reason, and proposed records. |
kanbancardmove | Committed moved cards, every changed canonical record, locations, and destination-bucket rebalance IDs. |
kanbanselectionchange | Selected card IDs/records and replace, toggle, range, clear, or API reason. |
kanbancolumnorderchange | Runtime workflow column order after native header drag or API movement. |
kanbandropstatechange | Current valid, invalid, or order-preserving no-op target state and localized reason. |
kanbandiagnostics | Current source/config diagnostics. |
kanbancardcreaterequest | Host-owned create workflow request. |
kanbancardopenrequest | Host-owned card detail request; the packaged editor does not consume it. |
kanbancardeditrequest | Host-owned card editor request. |
kanbancarddeleterequest | Host-owned delete workflow request. |
beforekanbancardcreate / kanbancardcreate | Cancelable create proposal and committed canonical card. |
beforekanbancardupdate / kanbancardupdate | Cancelable update proposal and committed card with previous record. |
beforekanbancarddelete / kanbancarddelete | Cancelable atomic delete proposal and committed card batch. |
beforekanbancardeditorvalidate | Cancelable start of packaged or replacement-editor validation; listeners can add errors. |
beforekanbancardeditorfieldvalidate | Cancelable per-field validation proposal with value and setError. |
kanbancardeditorfieldvalidate | Committed valid, invalid, skipped, or cancelled result for one editor field. |
kanbancardeditorvalidate | Completed editor validation result with valid, cancelled, and errors. |
kanbancardeditorinvalid | Validation completion that blocked submission because errors or cancellation remain. |
Event constants such as BEFORE_KANBAN_CARD_MOVE_EVENT and KANBAN_CARD_MOVE_EVENT are exported for refactor-safe listeners.
Editor validation constants are exported with
KanbanCardEditorDialogPlugin. beforekanbancardeditorvalidate and
beforekanbancardeditorfieldvalidate are cancelable; all other validation
events report committed results. Cancelling validation always blocks submit.
Cancel and persist a move
Section titled “Cancel and persist a move”grid.addEventListener(BEFORE_KANBAN_CARD_MOVE_EVENT, (event) => { if (!permissions.canMove(event.detail.cardIds, event.detail.target)) { event.preventDefault(); }});
grid.addEventListener(KANBAN_CARD_MOVE_EVENT, async (event) => { await api.saveCards(event.detail.changedCards);});Before-move listeners must make their cancel decision synchronously. Resolve remote authorization into local policy state before dragging begins.
CRUD request events remain the stable integration point. With KanbanCardEditorDialogPlugin installed they open the packaged workflow; without it, when it is disabled, or when a listener cancels the request, the application remains responsible. Committed mutation events are suitable for synchronizing remote state.