Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

mrchmchr
New Contributor II

Is it possible to detect when the last qlik element is completely rendered?

Hi everyone,

I am wondering if there is a way to schedule my code to be executed after the last qlik element on the website is rendered.

I want to add some listeners to different objects and I have to make sure they exist when I do so.

AFAIK the getObject() function returns a promise but is there also a posibility to detect when the last object is done rendering?

Glad for any ideas on this.

Regards,

Marco

1 Solution

Accepted Solutions
erik_wetterberg
Honored Contributor

Re: Is it possible to detect when the last qlik element is completely rendered?

Hi Marco,

The getObject promise resolves when the object is created, in most cases before it is completely rendered, but do you really need to wait until rendering is complete before adding the listeners? You could probably increment a counter when you call getObject and decrement it when the promise resolves, but there is no rendering complete event.

Hope this helps

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
1 Reply
erik_wetterberg
Honored Contributor

Re: Is it possible to detect when the last qlik element is completely rendered?

Hi Marco,

The getObject promise resolves when the object is created, in most cases before it is completely rendered, but do you really need to wait until rendering is complete before adding the listeners? You could probably increment a counter when you call getObject and decrement it when the promise resolves, but there is no rendering complete event.

Hope this helps

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
Community Browser