Custom Javascript call after Content Search WebPart Display Template is rendered

Copper Contributor

Hi All

I need to execute a custom JavaScript function once the display template of Content Search Webpart is rendered so I am calling that method inside "AddPostRenderCallback", my custom JavaScript is executing a method (customCSWPContext.get_dataProvider().issueQuery();) which reloads the webpart and hence it is getting stuck in infinite loop as custom function call inside "AddPostRenderCallback" will be executed again as webpart is reloaded by "issueQuery" method.
Is there any other way to execute a custom javascript after display template of CSWP is rendered? Any help would be highly appreciated.

 

Regards,

Sumit Garg

0 Replies