Skip to content

OrderList ​

Drag / button / Alt+arrow reorder

A list whose order is the setting — a playlist, a priority list, the columns of a table. To move items between two lists, use PickList.

Basic
  • 第1話 プロローグ
  • 第2話 運命の出会い
  • 第3話 フラグの立たない
  • 第4話 冴えない彼女
drag, ↑ ↓ buttons, or focus a row and Alt+↑/↓
  • Three ways to move: drag, the ↑ ↓ buttons, or focus a row and press Alt+↑ / Alt+↓. Each move is announced ("Moved to position 2 of 5") and focus follows the item.
  • Pass rowKey when items have an id, so rows keep their state (an open menu, an input) as they move.
  • :buttons="false" hides the buttons; keyboard and drag still work.

Usage ​

ts
import { BlessOrderList } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
rowKey((item: T, index: number) => string | number)—
labelstring"Reorder"
buttonsbooleantruehide the ↑ ↓ buttons (drag only)
modelValueT[][]

Events

NamePayloadDescription
move[from: number, to: number]
update:modelValue[value: T[]]

Slots

NameScopeDescription
default{ item: T; index: number; }

Released under the MIT License. Character names and artwork belong to their owners.