All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.src.vaadin-virtual-list.d.ts Maven / Gradle / Ivy

There is a newer version: 24.6.0
Show newest version
/**
 * @license
 * Copyright (c) 2021 - 2024 Vaadin Ltd.
 * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
 */
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
import type {
  VirtualListDefaultItem,
  VirtualListItemModel,
  VirtualListMixinClass,
  VirtualListRenderer,
} from './vaadin-virtual-list-mixin.js';

export { VirtualListDefaultItem, VirtualListItemModel, VirtualListRenderer };

/**
 * `` is a Web Component for displaying a virtual/infinite list of items.
 *
 * ```html
 * 
 * ```
 *
 * ```js
 * const list = document.querySelector('vaadin-virtual-list');
 * list.items = items; // An array of data items
 * list.renderer = (root, list, {item, index}) => {
 *   root.textContent = `#${index}: ${item.name}`
 * }
 * ```
 *
 * The following state attributes are available for styling:
 *
 * Attribute        | Description
 * -----------------|--------------------------------------------
 * `overflow`       | Set to `top`, `bottom`, both, or none.
 *
 * See [Virtual List](https://vaadin.com/docs/latest/components/virtual-list) documentation.
 *
 * @extends HTMLElement
 * @mixes ElementMixin
 * @mixes ThemableMixin
 * @mixes VirtualListMixin
 */
declare class VirtualList extends ThemableMixin(ElementMixin(HTMLElement)) {}

interface VirtualList extends VirtualListMixinClass {}

declare global {
  interface HTMLElementTagNameMap {
    'vaadin-virtual-list': VirtualList;
  }
}

export { VirtualList };




© 2015 - 2025 Weber Informatics LLC | Privacy Policy