ohctechv3/.svn/pristine/2e/2eff6366b1b6866252b1bc1f10b837c32e841a20.svn-base
2024-10-28 15:03:36 +05:30

35 lines
1.1 KiB
Plaintext

import { Component } from "./component";
export interface ListOption<TValue = string> {
value: TValue;
text?: string;
}
export declare class AgList<TValue = string> extends Component {
private readonly cssIdentifier;
private readonly unFocusable;
static EVENT_ITEM_SELECTED: string;
private static ACTIVE_CLASS;
private options;
private itemEls;
private highlightedEl;
private value;
private displayValue;
constructor(cssIdentifier?: string, unFocusable?: boolean);
private init;
handleKeyDown(e: KeyboardEvent): void;
addOptions(listOptions: ListOption<TValue>[]): this;
addOption(listOption: ListOption<TValue>): this;
clearOptions(): void;
private updateIndices;
private renderOption;
setValue(value?: TValue | null, silent?: boolean): this;
setValueByIndex(idx: number): this;
getValue(): TValue | null;
getDisplayValue(): string | null;
refreshHighlighted(): void;
private reset;
private highlightItem;
private clearHighlighted;
private fireChangeEvent;
private fireItemSelected;
}