setFetching

Updated:
Supported Platforms:
UUX

Toggles a spinner at the module/iframe level.

The setFetching function takes a single boolean argument, which toggles a spinner at the module/iframe level. This works by hiding the iframe the module is loaded into with CSS and rendering instead an instance of q2-spinner. The loading spinner feature that setFetching controls is on automatically while a module is loading and booting into a tecton outlet. An app running through the tecton system should call setFetching(false) as soon as their app is booted with sufficient data to preset to the user.

setFetching is returned in the actions object of the connect response.

While the main use for the outlet level loading spinner is to provide immediate visual feedback that a tecton module is loading, setFetching exposes the capability to turn the spinner back on and off again any time during a modules rendered existence.

The height of a tecton outlet is determined by the content inside it with a minimum height provided by the outlet's configuration. While the loading spinner is on, a module's content area will be the minimum configured size.

Details

Type

tecton.actions.setFetching(fetching?: boolean): void;

Example

Once a module has connected it must call setFetching(false) to become visible.

tecton.actions.setFetching(false);

Example

  • UUX
    Animation of setFetching workflow

    In this example, the setFetching method is first provided a true value. Then, after a one second delay, the setFetching method is provided a false value. While setFetching is active (true), a loading spinner will appear near the top-center of the page while the rest of the page content is hidden.

    Captured on UUX version 4.6.0.10A.

Arguments

UUX

Toggles an outlet level loading spinner

Release Notes

Initial Release