I'm using ExtJs 6.2.1. I have a panel with a loader configuration like the following:
loadHtml: function(url, params){
var maintab = this.getController('Main').getMainTab(),
tab = maintab.add({
title: params.label + (params.objectId ? ' ' + Lang._('n°') + params.objectId : ''),
bodyPadding: 5,
loader: {
url: Paths.ajax + 'sav/' + url,
params: params,
autoLoad: true,
loadMask: true,
failure: Mb.Msg.loaderFailure
},
scrollable: 'y',
closable: true
});
maintab.setActiveTab(tab)
},
// loadHtml is triggered by user interaction
// maintab is a tabpanel containing some tabs
The loadmask does never display. I think this post on the sencha forum is related.
There is a bug in
ComponentLoaderwhich does not allow to specify both optionsautoLoad: trueandloadMask: true.addMaskcalled on the panel even if it is not yet rendered.To solve the bug, let's add the loadMask on the
renderevent. The following override corrects the bug:Requirement: This requires that the rendering of the panel is faster than the XHR request fetching the panel content.