View as Markdown

API reference: @salmonui/dropdowns/listbox

ListboxItemStateinterface

import type { ListboxItemState } from '@salmonui/dropdowns/listbox';
interface ListboxItemState<T> {
    readonly item: T;
    readonly value: ListboxKey;
    readonly label: string;
    readonly selected: boolean;
    readonly active: boolean;
    readonly disabled: boolean;
    readonly matches: readonly ListboxMatchRange[];
}

renderItem argument.

ListboxItemState members (7)
NameSignatureDescription
itemreadonly item: T;
valuereadonly value: ListboxKey;
labelreadonly label: string;
selectedreadonly selected: boolean;
activereadonly active: boolean;
disabledreadonly disabled: boolean;
matchesreadonly matches: readonly ListboxMatchRange[];

Highlight ranges of the search text in label (with highlightMatches).