I'm facing an issue where I have implemented multiple filters but resetting them is not working as expected.
showOnlyMyRequest(){
this.requests = this.requests.filter(request => request.requestedBy === 'John Doe');
}
showAllRequest(){
this.requests = this.requests.filter(request => request.requestedBy === '*');
}
In the given code snippet, it's noticed that the showAllRequest()
function does not reset the previous filter applied.