OGE logoOGE

Transfer List

A dual list box — Kendo's ListBox toolbar, PrimeNG's PickList — as one form editor. Both sides are multiple-selection oge-list-boxes with every listbox key; the four buttons move the selection or everything a side shows, Ctrl+→ / ← on a focused list moves its selection toward the other list (with Shift: everything — mirrored in RTL, advertised with aria-keyshortcuts), and options drag between the lists with mouse, pen or touch.

Every path runs one move: the cancelable moving pre-event, the commit, a polite live announcement, then moved. The value is the target side's valueExpr results in arrival order; works with [(value)], [formField] and formControl/ngModel.

dual list box drag & drop keyboard moves forms

Getting started

Select options and use the buttons, press Ctrl+→ / Ctrl+← on a focused list (add Shift to move everything), or drag an option onto the other list. The locked permission stays where it is.

value = target side buttons Ctrl+arrows drag
Role permissions
Available7 items
Edit orders
Issue refunds
View users
Invite users
Manage roles
View reports
Export reports
Granted1 item
View orders

Value: ["orders.read"]

Search and check boxes

A search field above each list; the move-all buttons move what the list currently shows. Check glyphs make the multiple selection explicit.

searchEnabled showCheckBoxes
Available8 items
View orders
Edit orders
Issue refunds
View users
Invite users
Manage roles
View reports
Export reports
Selected0 items
No data to display

Groups and templates

groupBy and the list box templates ([ogeListBoxItemTemplate], [ogeListBoxGroupTemplate]) apply to both lists.

groupBy ogeListBoxItemTemplate
Available7 items
View ordersorders.read
Edit ordersorders.write
Issue refundsorders.refund
View usersusers.read
Invite usersusers.invite
Manage rolesusers.admin
Export reportsreports.export
Selected1 item
View reportsreports.read

Cancelable moves

moving fires before every move with cause ('button' | 'keyboard' | 'drag') — set cancel to veto it. Here the target side holds at most three permissions.

moving cancel moved
Available8 items
View orders
Edit orders
Issue refunds
View users
Invite users
Manage roles
View reports
Export reports
Granted (max 3)0 items
No data to display

Log: —

Inside a form

A FormValueControl and a ControlValueAccessor — the bound control holds the target side's values.

formControl Validators.required
Granted permissions
Available8 items
View orders
Edit orders
Issue refunds
View users
Invite users
Manage roles
View reports
Export reports
Selected0 items
No data to display
Grant at least one

Valid: false