Qlik Community

Ask a Question

Integration, Extension & APIs

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

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
BradMazurek
Contributor II
Contributor II

Extension API: mounted() and paint() discrepancy

Looking at the documentation for the Extension API's mounted() and paint() methods, both say the following:

$element

jQuery wrapper containing the HTML element where visualization should be rendered.

but the $element received by each are different. Based upon the documentation, I would expect them to be the same. What am I missing?

Labels (4)
3 Replies
ErikWetterberg

Different wrappers around the same element? Or different elements?

BradMazurek
Contributor II
Contributor II
Author

It appears to me to be different elements (a sub-element) to be precise.

Annotation 2019-12-31 114025.png

The first of which returns the yellow div below and the second returns the green div.

 

Annotation 2019-12-31 114251.png

 

For completeness, here is the code I'm using:

mounted: function ($element) {
	console.log("mounted");
	console.log($element);
},
		
paint: function ($element) {
	console.log("paint");
	console.log($element);

 

 

ErikWetterberg

Interesting. Looks like you are right. I don't use mounted much, in most cases I need the layout, which for some reason is not a parameter to mounted.