English
@eightkk/vue-weave / core / applyBoardCardMove
Function: applyBoardCardMove()
applyBoardCardMove<
C>(cards,move,board?):C[]
Defined in: src/core/taskBoard.ts:291
Apply a card-move proposal: a new array in which the card has the target column (and lane, when after.laneId is set) and sits before the card that had after.index in the target cell, or after the last card of that cell. Cards are never mutated; the moved card is a shallow copy. A proposal whose positions have no laneId treats each column as one cell and keeps the card's laneId.
Pass board to check the target column and lane against the board. Throws an Error for an unknown card, column or lane and for a stale proposal (the card is no longer at before), and a RangeError for an index that is not an integer from 0 to the size of the target cell.
Type Parameters
C
C extends TaskBoardCard<unknown>
Parameters
cards
readonly C[]
move
board?
columns?
readonly TaskBoardColumn[]
lanes?
readonly TaskBoardLane[]
Returns
C[]