Skip to main content

showLoadMask

@combeenation/custom-code-utils


Variable: showLoadMask()

const showLoadMask: (msg?, ctrlName?, cls?, forceShow?) => number = CtrlLoadMask.showLoadMask

Show load mask on the viewport or the given control.
Additionally the messages get queued within this function, so if a visible message gets hidden, the next one in the queue gets shown automatically.
Queues exist for each individual control.
The behaviour of the queues (FIFO, FILO) can be defined globally by using the setLoadMaskQueueMode function.

If the load mask should be shown on the viewport and there is already an error dialog visible, the call to showLoadMask will be ignored.
Also active load masks on the viewport are automatically hidden, when an error dialog is shown.

Parameters

msg?

string

Message to display on the loading mask. 'Loading...' is shown if not given.

ctrlName?

string

Name of control on which the load mask should be shown. Viewport is used if not given.

cls?

string

Class(es) which should be set for the loadmask, multiple classes can be assigend by seperating them with spaces (eg: class1 class2 class3)

forceShow?

boolean

true: shows message immediatly, even if it would have lower priority according to the queue mode

Returns

number

Id of the message created by this function.
Can be used to hide this specific message again using hideLoadMask