blessed-components - v1.20.0
    Preparing search index...

    Interface CollectionModel<TItem>

    Read-only ordered collection used by selection and focus primitives.

    interface CollectionModel<TItem extends CollectionItem> {
        enabledItems(): TItem[];
        first(): TItem | undefined;
        get(id: string): TItem | undefined;
        items(): TItem[];
        last(): TItem | undefined;
        next(id?: string, options?: CollectionNavigationOptions): TItem | undefined;
        previous(
            id?: string,
            options?: CollectionNavigationOptions,
        ): TItem | undefined;
        size: number;
    }

    Type Parameters

    • TItem extends CollectionItem

      Public item shape retained by the collection.

    Index

    Properties

    size: number

    Number of items, including disabled items.

    Methods