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

    Module Form/CustomScript/Utils/RunWithLoader

    Function for show overlay for long-running operations. The loader will be displayed until the action is completed.

    tisa.utils.runWithLoader(async () => {
    console.log("Main operation started...");

    // simulation of asynchronous operation
    await new Promise(resolve => setTimeout(resolve, 2000));

    await tisa.utils.runWithLoader(async () => {
    console.log("Sub-operation started...");

    // simulation of asynchronous operation
    await new Promise(resolve => setTimeout(resolve, 3000));

    console.log("Sub-operation completed.");

    }, "Processing sub-task...");

    // simulation of asynchronous operation
    await new Promise(resolve => setTimeout(resolve, 2000));

    console.log("Main operation completed.");
    }, "Processing main task...");

    Type Aliases

    RunWithLoaderType