TreeINFO-For-M365 documentation
    Preparing search index...

    Interface SelectionService

    Provides access to the list's selected items.

    Available via tisa.list.selection in list custom scripts.

    const selectedIds = tisa.list.selection.selectedItems;
    const selectedData = tisa.list.selection.selectedItemsData;

    tisa.list.selection.selectedItems = [1, 2, 3];
    tisa.list.selection.select(4);
    tisa.list.selection.select([4, 5]);
    tisa.list.selection.deselectAll();
    interface SelectionService {
        selectedItems: number[];
        selectedItemsData: IListItemBase[];
        deselect(itemIds: number | number[]): void;
        deselectAll(): void;
        isSelected(itemId: number): boolean;
        select(itemIds: number | number[]): void;
        selectAll(): void;
    }
    Index

    Properties

    selectedItems: number[]

    Array of selected item IDs. Setting replaces the entire selection.

    selectedItemsData: IListItemBase[]

    Full item data for all selected items

    Methods

    • Removes the specified item(s) from the current selection.

      Parameters

      • itemIds: number | number[]

      Returns void

    • Clears the entire selection.

      Returns void

    • Parameters

      • itemId: number

      Returns boolean

      whether the specified item is currently selected

    • Adds the specified item(s) to the current selection.

      Parameters

      • itemIds: number | number[]

      Returns void

    • Selects all items in the list.

      Returns void