Home > widget-integration > InstantSearchModule > setupBlockListener
InstantSearchModule.setupBlockListener() method
Sets up the TAE App block listener for instant search widget.
Follows the same pattern as FilterModule.setupBlockListener(), RecommendationModule.setupBlockListener(), etc.
Override this method to customize block detection or support additional block types.
Signature:
protected setupBlockListener(): void;
Returns:
void
Example
window.boostWidgetIntegration.extend('InstantSearchModule', (ISWModule) => {
return class CustomISW extends ISWModule {
protected setupBlockListener() {
this.appService.TAEApp.addRegistryBlockListener((block) => {
if (block.blockType === 'instantSearch' || block.blockType === 'customSearch') {
this.onInitBlock(block);
}
});
}
};
});