How to create an HTML button
<button
id="styleButton"
class="ml-2 refreshButton"
(click)="removeAllFilters(appliedFilters)"
>
<i class="fas fa-sync-alt"></i>
</button>
JavaScript function for removing all filters
removeAllFilters() {
this.appliedFilters = [];
this.searchText = '';
this.status.map(item => {
if (item.name !== TypeStatus.ACTIVE) item.selected = false;
});
this.locations.map(item => (item.selected = false));
this.roles.map(item => (item.selected = false));
}
I attempted to implement the remove all filters function, but it is not functioning properly.