{ updateSelection(value); close(); }"
/>
{ updateSelection(value); close(); }"
/>
{
const newValues = selectedValues.includes(value)
? selectedValues.filter(v => v !== value)
: [...selectedValues, value];
updateSelection(newValues);
}"
/>
List
~~~~
A performant, virtualized list component with optional auto-scroll behavior. ``List`` renders only visible rows into the DOM and uses a spacer + translated window to provide a full scrollable experience even for very large datasets.
Key features:
- Supports both in-memory arrays (``items``) and on-demand access via ``getItem`` + ``totalCount`` for very large lists.
- Optional fixed ``itemHeight`` or automatic measurement when ``itemHeight`` is ``0`` (uses ``ResizeObserver`` and averages several visible rows).
- Virtual buffer above/below the viewport to reduce popping during scrolls.
- Optional ``autoScroll`` that keeps the view pinned to the bottom (useful for logs/chat) and pauses when the user scrolls away.
- Simple slot-based rendering: the default slot receives ``{ item, index }`` for each visible row.
**Usage (in-memory items):**
.. code:: vue