combo-boxpackage.src.vaadin-combo-box-item-mixin.d.ts Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vaadin-webcomponents Show documentation
Show all versions of vaadin-webcomponents Show documentation
Mvnpm composite: Vaadin webcomponents
The newest version!
/**
* @license
* Copyright (c) 2015 - 2024 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
import type { Constructor } from '@open-wc/dedupe-mixin';
export type ComboBoxDefaultItem = any;
export interface ComboBoxItemModel {
index: number;
item: TItem;
selected: boolean;
focused: boolean;
}
export type ComboBoxItemRenderer = (
root: HTMLElement,
owner: TOwner,
model: ComboBoxItemModel,
) => void;
export declare function ComboBoxItemMixin>(
base: T,
): Constructor> & T;
export declare class ComboBoxItemMixinClass {
/**
* The item to render.
*/
index: number;
/**
* The item to render.
*/
item: TItem;
/**
* The text to render in the item.
*/
label: string;
/**
* True when item is selected.
*/
selected: boolean;
/**
* True when item is focused.
*/
focused: boolean;
/**
* Custom function for rendering the item content.
*/
renderer: ComboBoxItemRenderer;
/**
* Requests an update for the content of the item.
* While performing the update, it invokes the renderer passed in the `renderer` property.
*
* It is not guaranteed that the update happens immediately (synchronously) after it is requested.
*/
requestContentUpdate(): void;
}