interface ISelection {
    mode: SelectionMode;
    scrollItemToViewOnClick: boolean;
    index: number;
    add(index: number, scrollItToView?: boolean): void;
    clear(): void;
    enableArrowKeyNavigation(enabled: boolean, keySelectEvent?: string): void;
    enableFocusEvents(enabled: boolean): void;
    get(out?: number[]): number[];
    remove(index: number): void;
    selectAll(): void;
    selectReverse(): void;
}

层级 (查看完整内容)

实现于

属性

The selection mode of the selection.

选择的模式。

scrollItemToViewOnClick: boolean

Scroll the item into view when it is selected.

选择时滚动到视图中。

访问器

方法

  • 参数

    • index: number

      The index of the item to add.

    • 可选scrollItToView: boolean

      Whether to scroll the item into view.

    返回 void

    Add an item to the selection.

    添加一个项到选择中。

  • 参数

    • enabled: boolean

      Whether to enable arrow key navigation.

    • 可选keySelectEvent: string

      The event name to trigger when an item is selected using arrow keys.

    返回 void

    Enable or disable arrow key navigation.

    启用或禁用箭头键导航。

  • 参数

    • 可选out: number[]

      An optional array to store the selected items.

    返回 number[]

    The currently selected items.

    The currently selected items.

    当前选中的项。