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

    Interface ListWP

    Configuration interface for the List web part.

    {
    "ListUrl": "{SiteUrl}/Lists/Invoices"
    }
    {
    "ListUrl": "{SiteUrl}/Lists/Invoices",
    "CustomStyle": ".ms-DetailsList { font-size: 13px; }",
    "CustomScript": "let isApprover = false;\nasync function onInitComplete() {\n const m = await tisa.user.isUserInSPGroup('Approvers');\n isApprover = m.result;\n}\nfunction onSelectItem(ids) {\n tisa.log.debug('Selected: ' + ids.length);\n}\nfunction btnApproveEnabled() {\n return isApprover && tisa.list.selection.selectedItems.length > 0;\n}\nasync function btnApproveCommand() {\n await tisa.workflow.start('ApprovalWorkflow');\n tisa.list.selection.deselectAll();\n}\nasync function btnRefreshCommand() { await tisa.list.reload(); }",
    "ActionButtons": [
    {
    "Title": "Action.Approve",
    "ToolTipDescription": "Action.Approve.Tooltip",
    "ID": "Approve",
    "CommandFunction": "btnApproveCommand",
    "EnabledFunction": "btnApproveEnabled",
    "Icon": { "Icon": "regular/check" }
    },
    {
    "Title": "Action.Refresh",
    "ID": "Refresh",
    "CommandFunction": "btnRefreshCommand",
    "Icon": { "Icon": "regular/arrowsRotate" }
    }
    ],
    "Resources": [
    {
    "LCID": "1029",
    "Action": {
    "Approve": "Schválit",
    "Approve.Tooltip": "Schválit vybrané položky",
    "Approve.Done": "Schváleno",
    "Refresh": "Obnovit"
    }
    },
    {
    "LCID": "1033",
    "Action": {
    "Approve": "Approve",
    "Approve.Tooltip": "Approve selected items",
    "Approve.Done": "Approved",
    "Refresh": "Refresh"
    }
    }
    ]
    }
    interface ListWP {
        ActionButtons?: ActionButton[];
        CustomScript?: string;
        CustomStyle?: string;
        ListUrl: string;
        Resources?: Resource[];
    }
    Index

    Properties

    ActionButtons?: ActionButton[]

    Ribbon action buttons rendered above the list. Each button can reference functions from CustomScript via CommandFunction, EnabledFunction, and VisibleFunction.

    EnabledFunction and VisibleFunction are re-evaluated on every selection change.

    See ActionButton for the full type definition.

    CustomScript?: string

    JavaScript code executed in the list web part context. Supports lifecycle events (onInitComplete, onSelectItem) and action button functions (CommandFunction, EnabledFunction, VisibleFunction).

    See WebParts/ListWP/CustomScript for the full API reference.

    CustomStyle?: string

    Inline CSS injected into the list web part scope. Use it to override default list styling.

    ".ms-DetailsList { font-size: 13px; }"
    
    ListUrl: string

    Absolute or token-based URL of the SharePoint list to render.

    Supports {SiteUrl} token which is resolved at runtime to the current site URL.

    "{SiteUrl}/Lists/Invoices"
    
    Resources?: Resource[]

    Localization resources for button titles, tooltips, and custom script strings. Each entry targets a specific language via LCID. Keys are accessible in custom script via tisa.utils.translation("key").

    See Form/FormConfig.Resource for the full type definition.