Data
PickList
Two lists and the moves between them, with buttons, the keyboard or a double click, and reordering within each.
WAI-ARIA tested
Import
main.ts
import { PickList } from '@vitral/vue';Basic
Available skills
- Design
- Research
- Writing
- Analytics
- Support
Your skills
- Engineering
API
Read from packages/vue/src/components/PickList/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| optionLabel | string | Field (dotted path) holding an item's text, for the default template and the announcements. |
| dataKey | string | A field that identifies an item. |
| sourceHeader | string | Names the first list. Defaults to the locale's "Available". |
| targetHeader | string | Names the second list. Defaults to the locale's "Selected". |
| showSourceControls | boolean | Show the move buttons beside the first list. Defaults to true. |
| showTargetControls | boolean | Show the move buttons beside the second list. Defaults to true. |
| scrollHeight | string | The lists' height. |
| disabled | boolean | — |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Emits
| Event | Payload | Description |
|---|---|---|
| move-to-target | event: { items: unknown[] } | — |
| move-all-to-target | event: { items: unknown[] } | — |
| move-to-source | event: { items: unknown[] } | — |
| move-all-to-source | event: { items: unknown[] } | — |
| reorder | event: { list: 'source' | 'target'; value: unknown[] } | — |
Slots
| Name | Slot props | Description |
|---|---|---|
| option | (props: { item: unknown; index: number; selected: boolean; list: 'source' | 'target' }) | An item's content, in either list. |
| sourceheader | — | — |
| targetheader | — | — |