Event triggered when the facet's HTML is built?
newResultsDisplayed is used when the results are returned and HTML is built on the JS side. Is there a similar event for when the facet's HTML is built? The facetâs HTML is built latter and I am not able to use newResultsDisplayed event for this purpose.
Can anyone give me a sample of code which I can use to bind to this event. What I am looking for is an event fired when the Facet HTML is completed in the DOM after the request comes back from Coveo.
The rendering of facet are trigger by an event call
Try this :
// your facet will be updated
The event you are looking for is deferredQuerySuccess. When new results come in, the querySuccess event is first raised to update the result list and a few other things. Other UI updates are done in a separate step to allow the browser to display the results faster, and facets are updated at this moment. This second phase is done through deferredQuerySuccess.