Lazy load a custom widget on hidden tabs

Hi everyone, I have a custom widget on a hidden tab. The thing is that when I open the form, the widget will be initialized right after. I would like to know if there is any way to implement the lazy load of the widget: the widget is initialized after users click on the tab containing the widget. Does anyone have solution for my problem? Best regards,
1 answers

In your widget lifecycle functions you can add a function to the update function for example to check if the widget is actually on a visible tab. If not interrupt the loading and add a click listener to that tab. Once the tab gets clicked continue the loading.

For more information about the widget lifecycle check: mendix api documentation or dojo