TaskBoard - Undo and Redo
Use local TaskBoard history methods for reversible app-owned updates and movement flows.
#Usage
import { TaskBoard } from '@primeui/vue-taskboard';<TaskBoard.Root ref="board" v-model:tasks="tasks" data-key="id" column-field="columnId" @card-move="onCardMove" @card-update="onCardUpdate">
<!-- TaskBoard parts -->
</TaskBoard.Root>TaskBoard exposes undo, redo, canUndo, canRedo, and clearHistory on the root ref. History is local to built-in controlled mutations on v-model:tasks; external stores should keep their own undo stack.
#History Methods
| Method | Use |
|---|---|
undo, redo | Apply the previous or next local history entry. |
canUndo, canRedo | Read whether toolbar buttons should be enabled. |
clearHistory | Reset local history after save, reload, or route change. |
The history stack records moves, app-requested updates, creates, and deletes that TaskBoard applies itself. It uses the configured data-key, column-field, and swimlane-field, so custom item shapes can still undo and redo movement.
#Keyboard Shortcuts
Ctrl or Cmd Z calls undo. Ctrl or Cmd Shift Z and Ctrl or Cmd Y call redo through the keyboard handler.
#History Controls
The undo and redo sample shows toolbar actions, local history state, create events, and move events working together.
Loading Demo...