Service wrapping the full SPListProvider context. Exposed as tisa.list in list custom scripts.
tisa.list
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.
Readonly
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; Copy
const ids = tisa.list.selection.selectedItems;tisa.list.selection.select([1, 2, 3]);tisa.list.selection.deselectAll();const data = tisa.list.selection.selectedItemsData;
Current list items loaded by the list provider. Returns undefined when items have not been fetched yet.
undefined
const items = tisa.list.items;if (items) { tisa.log.info("Loaded " + items.length + " items");} Copy
const items = tisa.list.items;if (items) { tisa.log.info("Loaded " + items.length + " items");}
Reloads list items by fetching incremental changes from SharePoint and clears the current selection.
async function btnRefreshCommand() { await tisa.list.reload();} Copy
async function btnRefreshCommand() { await tisa.list.reload();}
Service wrapping the full SPListProvider context. Exposed as
tisa.listin 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.