| ... |
... |
@@ -45,12 +45,12 @@ |
| 45 |
45 |
this.results = []; |
| 46 |
46 |
} |
| 47 |
47 |
toggleRoleFilter(roleName) { |
| 48 |
|
- |
| 49 |
49 |
if(this.rolesFilter.indexOf(roleName) === -1) { |
| 50 |
50 |
this.rolesFilter.push(roleName); |
| 51 |
51 |
} else { |
| 52 |
|
- this.rolesFilter.filter(role => role !== roleName); |
|
51 |
+ this.rolesFilter = this.rolesFilter.filter(role => role !== roleName); |
| 53 |
53 |
} |
|
53 |
+ console.log(this.rolesFilter); |
| 54 |
54 |
this[roleName] = !this[roleName]; |
| 55 |
55 |
this.filterUrl.searchParams.set('roles', this.rolesFilter.join("+")); |
| 56 |
56 |
this.handleSearch(); |
| ... |
... |
@@ -96,7 +96,7 @@ |
| 96 |
96 |
if(this.hasActiveFilters()) { |
| 97 |
97 |
fetch(this.filterUrl).then(res => res.json()).then(resolve); |
| 98 |
98 |
} else { |
| 99 |
|
- resolve(null); |
|
99 |
+ resolve([]); |
| 100 |
100 |
} |
| 101 |
101 |
}); |
| 102 |
102 |
} |