Skip to content

clearFilters

clearFilters is a DOM event that occurs whenever the filters are cleared.

Event body

none

Example

In this example we listen to clearFilters event and perform an action whenever it's emitted.

useStorefront(async (storefront) => {
    document.addEventListener('clearFilters', () => {
        console.log('Filters have been cleared');
    });
});