# ef-list

Provides listing and immutable selection

## Properties

| Property                    | Attribute   | Type       | Default                       | Description                                      |
|-----------------------------|-------------|------------|-------------------------------|--------------------------------------------------|
| `data`                      |             | `ListData` | null                          | The data object, used to render the list.        |
| `delegatesFocus (readonly)` |             | `false`    | false                         | Element focus delegation.<br />Set to `false` and relies on native focusing. |
| `multiple`                  | `multiple`  | `boolean`  | false                         | Allow multiple selections                        |
| `renderer`                  |             |            | "createListRenderer<T>(this)" | Renderer used to render list item elements       |
| `stateless`                 | `stateless` | `boolean`  | false                         | Disable selections                               |
| `value`                     | `value`     | `string`   | ""                            | Returns the first selected item value.<br />Use `values` when multiple selection mode is enabled. |
| `values`                    |             | `string[]` | []                            | Returns a values collection of the currently<br />selected item values |

## Methods

| Method         | Type                                | Description                                      |
|----------------|-------------------------------------|--------------------------------------------------|
| `down`         | `(): void`                          | Navigate down through the list items             |
| `first`        | `(): void`                          | Navigate to first focusable item of the list     |
| `last`         | `(): void`                          | Navigate to first focusable item of the list     |
| `scrollToItem` | `(item: T): void`                   | Scroll to list item element<br /><br />**item**: Data item to scroll to |
| `selectItem`   | `(item: T \| HTMLElement): boolean` | Selects an item in the list<br /><br />**item**: Data Item or Item Element |
| `up`           | `(): void`                          | Navigate up through the list items               |

## Events

| Event           | Description                                      |
|-----------------|--------------------------------------------------|
| `value-changed` | Fired when the user commits a value change. The event is not triggered if `value` property is changed programmatically. |
