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

    Service wrapping the full SPListProvider context. Exposed as tisa.list in list custom scripts.

    Uses a getter function to always access the latest React state through refs, so the service instance is created once and never re-created on re-renders.

    Hierarchy

    • BaseService<WebPartContext>
      • List

    Implements

    • IListService
    Index

    Properties

    Accessors

    Methods

    Properties

    selection: Selection

    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;

    Accessors

    • get items(): undefined | ListItem[]

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

      Returns undefined | ListItem[]

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

    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();
      }