Premium support for our pure JavaScript UI components


Post by victor_bezak »

When we load a large amount of data with autoLoad, the loadMask seems to be getting disabled around the time the onBeforeLoadApply callback fires, but BEFORE the onDataReady callback. Because of this, the loadMask disappears before the data has rendered on the screen.

This appears to be an oversight/bug in the code. The loadMask should not get removed until onDataReady executes. (or until project.isLoaded === true). How can we stop the loadMask from disappearing automatically, so that we can manually unmask it in the onDataReady callback?


Post by tasnim »

Hi,

How can we reproduce it? Are you able to reproduce it with one of our examples here https://bryntum.com/products/gantt/examples/?

You could also manually mask and unmask gantt with these methods
https://bryntum.com/products/gantt/docs/api/Gantt/view/Gantt#function-mask
https://bryntum.com/products/gantt/docs/api/Gantt/view/Gantt#function-unmask


Post by victor_bezak »

those methods don't help in this case. The problem is that the loading mask which is applied automatically with autoLoad, is also getting automatically removed. And it's automatically removed prematurely. It's subtle, but you can honestly notice it anywhere, even in this demo: https://bryntum.com/products/gantt/examples/advanced/

The longer your data takes to render in the gantt after it's returned from your loadUrl, the more dramatic this problem gets. In extreme cases you can end up with seconds of white-screen from the time the load mask is removed to the time your tasks are drawn in the gantt. You see the gantt appear for a short amount of time with NO loading mask and NO data drawn yet. This is happening because loading mask is removed too soon -- around time of onBeforeLoadApply callback, instead of when it should be removed, around the time of onDataReady. A dev can verify this by placing a "debugger" statement in the onBeforeLoadApply listener. They'll see that the loading mask is removed then, yet no data has appeared yet.

Last edited by victor_bezak on Wed Feb 05, 2025 8:42 am, edited 4 times in total.

Post by victor_bezak »

Getting confirmation on this from one of the Bryntum devs would be great, but in the mean-time, I'm also asking if there is a way to stop the automatic unmasking that happens internally by the autoLoad feature?


Post by Animal »

The mask can disappear slightly before the tasks are rendered: https://github.com/bryntum/support/issues/10744


Post by Animal »

In the meantime, there is a private property of CrudManager which you could add.

clearMaskDelay is a number of milliseconds to delay clearing the mask. You could experiment with that. It's a blunt tool because it's a fixed time, but should only be necessary until the fix comes out next version.


Post Reply