Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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 (2)
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.