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

    Interface SearchWP

    Configuration interface for the Search web part.

    interface SearchWP {
        ActionButtons?: ActionButton[];
        CustomScript?: string;
        CustomScriptUrl?: string;
        CustomStyle?: string;
        Groups: Group[];
        Ribbon: WebpartRibbon;
        Title: string;
    }
    Index

    Properties

    ActionButtons?: ActionButton[]

    Global action buttons rendered above the search form. Visible on all tabs. Each button can reference functions from CustomScript via CommandFunction, EnabledFunction, and VisibleFunction.

    EnabledFunction and VisibleFunction are re-evaluated on tab changes and after search completes.

    See ActionButton for the full type definition.

    CustomScript?: string

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

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

    CustomScriptUrl?: string

    Tokenized URL to load custom script from (e.g. SiteAssets). Resolved at runtime. Supports {SiteUrl}, {Namespace} and other expression tokens. When set, takes precedence over CustomScript.

    CustomStyle?: string

    Inline CSS injected into the search web part scope.

    Groups: Group[]
    Title: string