Lista
- Komponent
-
FList
- Status
-
Produktionsklar
Innehåll
Lista används när användaren behöver gå igenom ett antal poster för att hitta en särskild post som ska visas eller hanteras.
Användning av komponent
Komponent motsvarar följande HTML element: Unordered List
API
Name | Description | Type | Required | Default |
---|---|---|---|---|
items | The items to be listed. | ListArray | true | ‐ |
keyAttribute | Unique attribute in items. | string | true | ‐ |
selectable | If | boolean | false | false |
checkbox | Only applies if selectable:true | boolean | false | true |
v-model | V-model will bind to value containing selected items. | ListArray | undefined | false | () => undefined |
v-model:active | V-model will bind to value containing the current active item. | ListItem | undefined | false | () => undefined |
elementId | Unique item id that will be used instead of the automatically generated one. | string | false | () => ElementIdService.generateElementId() |
Name | Description | Properties |
---|---|---|
change | Emitted when item is activated, i.e. clicked | item: ListItem |
click | Emitted when item is activated, i.e. clicked | item: ListItem |
update | Vue2 v-model event to update value properity. | <anonymous>: undefined |
unselect | Emitted when item is unselected. | item: ListItem |
update:modelValue | V-model event to update value property. | <anonymous>: undefined |
select | Emitted when item is selected. | item: ListItem |
update:active | V-model active event. | activeItem: ListItem |
Name | Description | Bindings |
---|---|---|
default | Slot for displaying an item. | item |
empty | Slot for displaying a message when list is empty. | ‐ |
screenreader | Slot for screen reader text when checkbox (to selecte item) get focus. | item |