Home > widget-integration > InstantSearchController > closeISWDialog
InstantSearchController.closeISWDialog() method
Close the theme <dialog> that is currently hosting the ISW element.
Override to apply a custom close strategy for a specific theme (e.g. clicking a close button instead of calling dialog.close()).
Signature:
protected closeISWDialog(): void;
Returns:
void
Example
window.boostWidgetIntegration.extend('InstantSearchController', (InstantSearchController) => {
return class CustomController extends InstantSearchController {
protected closeISWDialog() {
document.querySelector('.my-search-modal__close')?.click();
}
};
});