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

    Interface ListService

    Provides access to list data, selection, and list-level operations.

    Available via tisa.list in list custom scripts.

    // Access list items
    const items = tisa.list.items;

    // Work with selection
    const selectedIds = tisa.list.selection.selectedItems;
    tisa.list.selection.select(4);
    tisa.list.selection.deselectAll();

    // Reload list data
    await tisa.list.reload();
    interface ListService {
        items: undefined | IListItemBase[];
        selection: SelectionService;
        reload(): Promise<void>;
    }
    Index

    Properties

    Methods

    Properties

    items: undefined | IListItemBase[]

    Current list items loaded by the list provider. Returns undefined when items have not been fetched yet.

    const items = tisa.list.items;
    if (items) {
    tisa.log.info("Loaded " + items.length + " items");
    }
    selection: SelectionService

    Provides access to the list's selected items.

    const ids = tisa.list.selection.selectedItems;
    tisa.list.selection.select([1, 2, 3]);
    tisa.list.selection.deselectAll();

    const data = tisa.list.selection.selectedItemsData;

    Methods

    • Reloads list items by fetching incremental changes from SharePoint and clears the current selection.

      Returns Promise<void>

      async function btnRefreshCommand() {
      await tisa.list.reload();
      }