LoadMaskable

Configs

4
loadMask: String | MaskConfig | null= "Loading..."

A Mask config object, or a message to be shown when a store is performing a remote operation, or Crud Manager is loading data from the sever. Set to null to disable default load mask.

A Mask config object to adjust the maskDefaults when data is loading. The message and optional configuration from the loadMask config take priority over these options, just as they do for maskDefaults, respectively.

The final mask configuration for a load mask is as if the following were applied:

 Object.assign({},
     widget.maskDefaults,
     widget.loadMaskDefaults,
     widget.loadMask);

A Mask config object to adjust the maskDefaults when an error occurs loading data.

Set to false to disable showing data loading error mask.

The final mask configuration for an error mask is as if the following were applied:

 Object.assign({},
     widget.maskDefaults,
     widget.loadMaskDefaults,
     widget.loadMaskError,
     errorMessage);
syncMask: String | MaskConfig | null= "Saving changes, please wait..."

A Mask config object, or a message to be shown when Crud Manager is persisting changes on the server. Set to null to disable default sync mask.

This config is similar to loadMask but designed for saving data.

To create a custom sync mask need to subscribe to the Crud Manager events and show Mask on beforeSend and hide it on requestDone and requestFail.

To create a custom sync mask, set this config to null and subscribe to the CrudManager's events to show or hide the mask as desired.

 widget.crudManager.on({
     loadStart() {
         widget.masked = {
             text : 'Data is loading...'
         };
     },
     load() {
         widget.masked = null;
     },
     loadCanceled() {
         widget.masked = null;
     },
     syncStart() {
         widget.masked = null;
     },
     sync() {
         widget.masked = null;
     },
     syncCanceled() {
         widget.masked = null;
     },
     requestFail({ response }) {
         widget.masked.error = response.message || 'Sync failed';
     }
 });

 store.load();

Properties

2
isLoadMaskable: Boolean= truereadonly
Identifies an object as an instance of LoadMaskable class, or subclass thereof.
isLoadMaskable: Boolean= truereadonlystatic
Identifies an object as an instance of LoadMaskable class, or subclass thereof.